ZeroHour

CVE-2026-59960

niche

OS command injection in @argos-ci/core via CI branch names

CVSS 3.1
7.5 high
EPSS
Published
()
Modified
AI analysis

@argos-ci/[email protected] is vulnerable to OS command injection (CWE-78): the CI branch/ref string, sourced unvalidated from the CI environment (e.g., GITHUB_HEAD_REF on GitHub Actions), is interpolated directly into an execSync() template literal in packages/core/src/ci-environment/git.ts, which executes it via /bin/sh -c so metacharacters like $() or backticks are evaluated as shell commands. The vulnerable path is reached when the Argos API reports hasRemoteContentAccess: false, causing the upload flow to call getMergeBaseCommitSha(), which passes the unsanitized branch name as the ref to gitFetch()'s `git fetch` command; a secondary sink exists in a `git merge-base` call. An attacker who can influence a project's branch name, for example by opening a pull request with a crafted branch name containing shell metacharacters, gains arbitrary OS command execution on the CI runner. Projects running @argos-ci/core 6.2.0 in CI where branch names can be attacker-controlled and remote content access is disabled are affected. There is no known public proof-of-concept, the issue is not in CISA KEV, and no in-the-wild exploitation is known.

What to do: Upgrade to a patched @argos-ci/core release when one becomes available; the recommended fix is to replace template-literal execSync() calls with execFileSync() using argument arrays so the shell is bypassed entirely. As interim mitigations, allowlist or sanitize the CI branch name (e.g., reject shell metacharacters in GITHUB_HEAD_REF) or ensure the Argos project has remote content access so the getMergeBaseCommitSha() path is not taken. Review CI runner logs and stored secrets for signs of command execution triggered by attacker-crafted pull-request branch names.

Affected
argos-ci @argos-ci/core (npm)6.2.0 (the version named in the advisory; exact affected range and fixed version not specified in the data)
Estimated exposure
nichelikely low tens of thousands of CI-runner installations at most, further limited to projects using Argos with remote content access disabled (estimate) — No public download or active-install counts were provided, so the estimate reflects that @argos-ci/core is a specialized visual-regression-testing SDK for the Argos service, and only configurations where hasRemoteContentAccess is false…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

Argos JavaScript provides official Argos SDKs for JavaScript. Prior to Argos core package version 6.2.1, attacker-controlled CI branch or ref values from GITHUB_HEAD_REF or ARGOS_BRANCH can flow through config.branch and getMergeBaseCommitSha() when hasRemoteContentAccess is false. The gitFetch() and gitMergeBase() functions in packages/core/src/ci-environment/git.ts interpolate these values into execSync() command strings executed by /bin/sh -c, so shell metacharacters in a pull-request branch name can execute arbitrary commands with the Argos upload process privileges on the CI runner. Successful exploitation can expose CI secrets, alter build artifacts, or compromise the runner. This issue is fixed in Argos core package version 6.2.1.

Ecosystems
npm
Weakness
CWE-78
Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
GHSA
GHSA-4x45-gxvp-6283 (high)

In the news

No ingested article mentions this CVE yet.