CVE-2026-104859 in Nrwlinfo

Summary

by MITRE • 10/02/2026

Nx is a monorepo solution for TypeScript and polyglot codebases. From 21.4.0 until 22.7.8 and from 23.0.0 until 23.1.1, the @nx/docker release pipeline builds docker tag, image lookup, and docker push invocations as shell command strings. The release.docker.repositoryName and registryUrl configuration values are interpolated into those strings and passed to /bin/sh -c, allowing shell syntax in untrusted Nx configuration to execute during nx release version or nx release publish. A pull request or repository configuration change can therefore execute commands with the release job's privileges and expose registry credentials or cloud tokens, and dry-run publishing does not prevent the vulnerable pre-check command from executing. This issue is fixed in versions 22.7.8 and 23.1.1.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 10/02/2026

The vulnerability identified within Nx, a popular monorepo management tool for TypeScript and polyglot codebases, represents a critical server-side request forgery and command injection flaw located specifically within the release pipeline functionality. This issue affects versions ranging from 21.4.0 through 22.7.8 and from 23.0.0 through 23.1.1. The core technical defect arises from how the @nx/docker plugin constructs shell commands for Docker operations such as tagging, image lookup, and pushing images to a registry. Instead of utilizing safe programmatic APIs or argument arrays that prevent interpretation of special characters by the shell interpreter, the tool interpolates user-supplied configuration values directly into string-based shell command invocations. Specifically, the release.docker.repositoryName and registryUrl configuration parameters are concatenated into strings that are subsequently passed to /bin/sh -c for execution. This architectural choice creates a direct pathway for arbitrary code execution if an attacker can influence these configuration fields.

The operational impact of this vulnerability is severe due to the context in which it executes. The release pipeline typically runs with elevated privileges, often possessing access to sensitive registry credentials, cloud provider tokens, and deployment secrets necessary to publish software artifacts securely. Because the vulnerable pre-check commands execute during phases like nx release version or nx release publish, an attacker does not need full control over the build server; they only need the ability to modify repository configuration files or submit a pull request that alters these specific Docker-related settings. By injecting shell metacharacters such as semicolons, pipes, or backticks into the repositoryName or registryUrl fields, an adversary can break out of the intended command context and execute arbitrary system commands. This capability allows for the exfiltration of sensitive data stored in environment variables, modification of build artifacts to introduce malware, or further lateral movement within the CI/CD infrastructure.

A particularly dangerous aspect of this flaw is that it persists even during dry-run operations. Typically, developers rely on dry-run modes to preview changes without side effects, assuming no actual commands are executed against production systems. However, in this case, the vulnerable pre-check command still executes its shell invocation regardless of whether a real publish or only a simulation is requested. This undermines standard safety protocols and ensures that exploitation can occur during routine validation steps, increasing the attack surface significantly. The vulnerability aligns with CWE-78 Improper Neutralization of Special Elements used in an OS Command, commonly known as OS Command Injection, where untrusted data is passed to a shell without proper sanitization or escaping. From a threat modeling perspective using MITRE ATT&CK techniques, this maps directly to T1059 Command and Scripting Interpreter, specifically the use of Unix Shell commands for remote code execution via CI/CD pipeline manipulation.

Mitigation strategies must prioritize immediate version upgrades alongside defensive configuration practices. The primary remediation is to upgrade Nx to versions 22.7.8 or later, including all subsequent releases in the 23.x line such as 23.1.1 and beyond, where this interpolation flaw has been corrected by implementing safer command execution methods that do not rely on shell interpretation of user-controlled strings. For organizations unable to upgrade immediately due to dependency constraints, strict input validation should be enforced at the repository configuration level to reject any characters commonly used in shell injection attacks, although this is a less robust defense than patching the underlying software logic. Additionally, implementing least-privilege principles for CI/CD runners can limit the blast radius if exploitation occurs by restricting access to sensitive credentials and network resources. Regular auditing of pull requests that modify build configuration files is also recommended to detect any attempts to inject malicious payloads into these fields before they are merged into the main branch.

Responsible

GitHub M

Reservation

10/02/2026

Disclosure

10/02/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!