Skip to content

VNX-GH-002: Untrusted input written to GITHUB_ENV or GITHUB_PATH

Attacker-controlled text is appended to the job's environment or PATH file.

Updated 02 Nov 2026Checked against cli@24498404a, vdb-sca-match@v0.8.14

Lines appended to $GITHUB_ENV become environment variables for every later step, and lines appended to $GITHUB_PATH prepend directories to PATH. A value containing a newline can define LD_PRELOAD, NODE_OPTIONS, BASH_ENV or a new PATH entry, giving code execution in later steps even when those steps are written safely.

Severity High
Confidence high
CWE CWE-77, CWE-427
Command vulnetix gha workflows, vulnetix gha audit
Mappings T1574

Remediation

Do not write untrusted values to GITHUB_ENV/GITHUB_PATH. If a later step needs the value, pass it through a step output and env:, or use a random heredoc delimiter and validate the value first.

Run only this rule

vulnetix gha workflows --rule VNX-GH-002

Scoring

CWSS vector at the rule’s default severity: CWSS:1.0/TI:H/AP:A/AL:A/IC:N/FC:LT/RP:N/RL:A/AV:I/AS:N/IN:A/SC:A/BI:H/DI:H/EX:M/EC:N/P:W. A finding whose severity the repository’s settings moved is scored at its adjusted severity.

All rules: GitHub rules.

Edit this pageSources: vdb-sca-match/ghaudit/rules_workflows.go, cli/internal/ghtasks/docs.go
esc
↑ ↓ move↵ openSearches in your browser. A key like autonomy.max or a code like threshold_required jumps straight to it.