<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>@Argos-Ci/Cli - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/@argos-ci/cli/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 11 Sep 2026 00:54:24 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/@argos-ci/cli/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>OS Command Injection in @argos-ci/core via CI Branch Names</title><link>https://feed.craftedsignal.io/briefs/2026-09-argos-ci-rce/</link><pubDate>Fri, 11 Sep 2026 00:54:24 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-09-argos-ci-rce/</guid><description>The @argos-ci/core package is vulnerable to OS command injection when processing unvalidated branch or reference names in environments where hasRemoteContentAccess is disabled, allowing arbitrary code execution on CI runners.</description><content:encoded><![CDATA[<p>The @argos-ci/core package (version 6.2.0 and earlier) contains an OS command injection vulnerability located in the git interaction logic. When a project is configured with <code>hasRemoteContentAccess: false</code>, the Argos upload process triggers local Git commands, including <code>git fetch</code> and <code>git merge-base</code>, via Node.js <code>execSync</code> calls. The vulnerability arises because the branch name (<code>input.ref</code>) and other input parameters are interpolated into command strings without any sanitization or escaping.</p>
<p>Since <code>execSync</code> spawns a <code>/bin/sh</code> shell to execute the command, shell metacharacters provided in the CI branch name (such as <code>$()</code>, backticks, or <code>;</code>) are interpreted and executed by the shell before the <code>git</code> process begins. An attacker who can influence the CI environment variables or the branch name of a triggered build - such as via a pull request - can execute arbitrary OS commands on the CI runner. This allows for the theft of repository secrets, tampering with build artifacts, or lateral movement within the CI infrastructure.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker creates a malicious pull request or branch name containing shell metacharacters, such as <code>main$(touch /tmp/pwned)</code>.</li>
<li>The CI pipeline initiates an Argos upload process within an environment where <code>hasRemoteContentAccess</code> is set to <code>false</code>.</li>
<li>The <code>argos</code> CLI reads the malicious environment variable (e.g., <code>GITHUB_HEAD_REF</code> or <code>ARGOS_BRANCH</code>) and passes it into the internal <code>config</code> object.</li>
<li>The <code>upload.ts</code> module calls <code>getMergeBaseCommitSha()</code> using the attacker-controlled branch name as the <code>head</code> parameter.</li>
<li>The <code>gitFetch()</code> function in <code>packages/core/src/ci-environment/git.ts</code> receives the malicious string as the <code>ref</code> input.</li>
<li>The <code>execSync()</code> function interpolates the malicious branch string into a shell command template literal.</li>
<li>The underlying <code>/bin/sh</code> shell evaluates the embedded command substitution, executing the attacker's payload on the CI runner.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation results in full OS command execution on the build runner with the permissions of the CI agent process. This typically includes access to sensitive environment variables (API keys, cloud credentials, and repository secrets). Organizations using Argos in CI environments without external remote access verification are at risk, particularly those that process builds from untrusted contributors or forks.</p>
<h2 id="recommendation">Recommendation</h2>
<ol>
<li>Upgrade to a version of <code>@argos-ci/core</code> that replaces vulnerable <code>execSync</code> template-literal invocations with <code>execFileSync</code> using discrete argument arrays to prevent shell interpolation.</li>
<li>In the interim, implement strict input validation on all CI branch and reference environment variables to allow only alphanumeric characters, dashes, and underscores.</li>
<li>Review CI pipeline configurations to ensure that runners executing <code>argos upload</code> do not have access to sensitive secrets, or migrate to workflows that utilize <code>hasRemoteContentAccess: true</code> to avoid the vulnerable local Git code path.</li>
</ol>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>ci-cd</category><category>command-injection</category><category>supply-chain</category></item></channel></rss>