Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious nx.json plugin option with shell syntax
-
DeliveryVictim clones repo or CI checks out the pull request
-
ExploitVictim runs an nx project-graph command
-
ExecutionPlugin spawns analyzer via shell and interpolates the option
-
ImpactInjected commands execute with the user's privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The workspace must register @nx/maven and/or @nx/gradle in nx.json - workspaces using neither plugin are not exposed. The injectable inputs are specific: for @nx/maven the targetNamePrefix option value; for @nx/gradle any plugin option name or value (each is mapped into a -P argument, so both names and values are injectable). Exploitation requires that a victim run an nx command which constructs the project graph while inside an attacker-controlled repository or a pull request that can write nx.json. Limiting factors: the attack is local (AV:L), needs victim interaction (running nx), and needs the affected plugin configured; critically, in most such workspaces an attacker who can edit nx.json can usually already execute code via the repo's build files (./mvnw, pom.xml, gradlew), so the genuinely new exposure is narrow - chiefly CI building a fork's pull request where nx.json is writable but build files are not. There is no configuration toggle to mitigate; per the vendor, upgrading both nx and the affected plugin to matching releases is the entire fix. |
| Impact | Severity signals point to a real but conditional threat. The CVSS 4.0 vector (CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H) scores 7.3 (High) and describes a LOCAL attack (AV:L) that requires a present attack condition (AT:P) and victim interaction (UI:P) - this is not remote, drive-by exploitation. PR:N reflects that the attacker needs no privileges on the victim's machine, but the attack only fires when a victim runs an nx command inside an attacker-supplied workspace, so AV:L and UI:P are the real gatekeepers. The vuln.today decision label is 'this_week' rather than act_now/emergency, consistent with a serious issue that is not an active-exploitation fire drill. There is no CISA KEV listing and no EPSS score supplied; the vendor explicitly states 'We have no evidence of exploitation in the wild,' so exploitation status is: no public exploit identified at time of analysis. The references are fix artifacts (advisory, PR #36626, commits, release tags), not weaponized exploit code. The vendor also narrows the genuinely new exposure: in most Maven/Gradle workspaces an attacker who can write nx.json could already run code via build files (./mvnw, pom.xml, gradlew), so the added risk is concentrated in cases like CI building a fork's pull request where nx.json is writable but the build files are not. Net: a legitimate same-week patching priority for teams using @nx/maven or @nx/gradle, but not a widespread internet-facing emergency - raw CVSS High overstates blast radius relative to the local/interaction preconditions and the absence of KEV/EPSS exploitation signals. |
| Exploit ScenarioDerived | An attacker opens a pull request (or publishes a repository) that edits nx.json to set the @nx/maven targetNamePrefix option, or an arbitrary @nx/gradle option name/value, to a string containing shell metacharacters. When a developer or CI job building that fork runs any nx command that constructs the project graph, the plugin spawns its analyzer through a shell and the injected syntax executes as OS commands with the victim's privileges. No public working exploit was supplied, though the advisory's own test demonstrates the injection concept (e.g. '-PtargetNamePrefix=x; touch /tmp/pwned'); the local vector and required user interaction limit this to attacker-supplied workspaces. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 29, 2026
Shell command injection in Nx's @nx/maven and @nx/gradle project-graph analyzers lets an attacker who can write nx.json execute arbitrary commands as the developer or CI runner who next builds the project graph. @nx/maven is exposed from 22.0.2 through 22.7.8 and 23.0.0 through 23.1.1 via the targetNamePrefix option, while @nx/gradle is exposed from 21.0.0 through 22.7.8 and 23.0.0 through 23.1.1 with a wider surface, since every plugin option name and value is mapped into a -P argument. Exploitation is local, requires the victim to run an nx command inside an untrusted repository or a pull request that edits nx.json, and only affects workspaces that actually register one of the two plugins; the vendor reports no evidence of exploitation in the wild and no public exploit code was identified at time of analysis.
RemediationAI
Vendor-released patch: upgrade to 22.7.9 (22.x line) or 23.1.2 (23.x line) or later, and upgrade nx together with each affected plugin - running nx migrate 23.1.2 is the documented path. Bumping @nx/maven or @nx/gradle without a matching nx upgrade will not resolve the issue because the plugin fix depends on the safeSpawn and safeExecFileSync helpers added to @nx/devkit/internal in the nx package (see https://github.com/nrwl/nx/pull/36626 and the release tags https://github.com/nrwl/nx/releases/tag/22.7.9 and https://github.com/nrwl/nx/releases/tag/23.1.2). The vendor states there is no configuration change that mitigates the flaw - upgrading is the whole fix - so the only compensating control is procedural: on a vulnerable version, run nx commands only in repositories whose nx.json you trust, which limits exposure but leaves CI jobs that build fork pull requests (where nx.json is writable but build files are not) dependent on the upgrade for protection.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 5 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Nx is a monorepo build system for TypeScript and polyglot codebases, and its @nx/maven and @nx/gradle plugins compute the project graph by spawning external analyzers. Before the fix, those spawns went through node:child_process with shell: true, and plugin options read from nx.json were interpolated directly into the command line string. Because a shell parses the entire line, option content is treated as shell source rather than as an opaque argument - the classic OS command injection pattern (CWE-78), which the upstream advisory also characterises as argument injection (CWE-88). For Maven the only injectable field is targetNamePrefix; for Gradle the exposure is broader because each plugin option becomes a -Pkey=value argument and arbitrary option names are accepted, so both the name and the value can carry shell syntax. The patch (PR 36626) adds safeSpawn and safeExecFileSync helpers to @nx/devkit/internal, drops shell: true so arguments are passed literally, filters empty arguments that the shell previously swallowed, and attaches an 'error' handler because without a shell the child is gradlew itself and spawn can fail outright instead of emitting 'exit'. The trigger is described in the sources as any nx command that constructs the project graph; the advisory notes that in most such workspaces an attacker able to edit nx.json can usually already execute code via ./mvnw, pom.xml or the Gradle equivalents, so the genuinely new exposure is narrow - chiefly CI building a fork's pull request where nx.json is writable but build files are not.
Know when Nx gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Local because exploitation requires running nx against an attacker-supplied workspace (AV:L); PR:N since the victim needs no privileges; UI:R as the victim must run an nx graph command; full C/I/A as code runs as the user.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Nx is a monorepo solution for TypeScript and polyglot codebases. From 22.0.2 until 22.7.9 and 23.1.2 for @nx/maven, and from 21.0.0 until 22.7.9 and 23.1.2 for @nx/gradle, the plugins' project-graph analyzers launch through a shell and interpolate plugin options from nx.json into command arguments. The @nx/maven targetNamePrefix value and arbitrary @nx/gradle option names or values can therefore be interpreted as shell syntax whenever an nx command constructs the project graph. A user who runs Nx in an attacker-controlled repository or pull request can execute injected commands with the user's privileges, while workspaces that register neither affected plugin are not exposed to this path. Remediation requires upgrading both nx and each affected plugin to matching releases because the plugin fix depends on code in the nx package. This issue is fixed in versions 22.7.9 and 23.1.2.
Technical POC Analysis
CWE-78 (OS command injection), with the advisory also tagging CWE-88 (argument injection).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
CVE-2026-119282 is a high-severity shell command injection vulnerability in Nx's @nx/maven and @nx/gradle plugins, enabling arbitrary code execution on developer workstations or CI runners when a malicious nx.json is processed. This threatens source code and build system integrity, potentially leading to supply chain compromise or credential theft. Leadership should prioritize mitigation because affected teams may unknowingly run untrusted code during routine builds.
No vendor-released patch identified at time of analysis. Interim mitigations: restrict write access to nx.json to trusted maintainers, enforce mandatory code reviews for nx.json changes, run builds in isolated containers with minimal privileges, and disable the vulnerable plugins if not required.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Apache Log4j2 contains a critical JNDI injection vulnerability known as 'Log4Shell' that allows unauthenticated remote c
Embedded malicious code in Nx Console (the editor extension for Nx and Lerna) version 18.95.0 turned a trusted developer
Nx versions prior to V2512 contain an insufficient input validation flaw in the PDF export functionality that permits lo
Command injection in the Nx `@nx/docker` release pipeline (nx 21.4.0 through 22.7.7 and 23.0.0 through 23.1.0) lets an a
Cross-origin information disclosure in the Nx monorepo graph server (versions 17.0.4 through 22.7.1) exposes the full pr
Path traversal in Nx's migration planner lets a hostile dependency write attacker-controlled bytes outside the temporary
EUVD-2026-113391
GHSA-qm8w-vx34-5j9j
NVD
CVE.org
EPSS
Exploit-DB