CVE-2025-36852: @nx/azure cache @nx/azure-cache Vulnerable To Build Cache Vulnerability

CRITICAL
Advisory Identifier: GHSA-rrr2-jcr8-7q3x
CWE-829
Published
Advisory Summary

CVE-2025-36852 is a CRITICAL @nx/azure-cache vulnerable to build cache vulnerability (CWE-829: Inclusion of Functionality from Untrusted Control Sphere) affecting @nx/azure cache libraries in the npm ecosystem. The issue involves @nx/azure-cache vulnerable to build cache poisoning via untrusted pull requests. Remediation is available in the latest vendor maintenance releases.

CVE-2025-36852 at a Glance

CVE Identifier CVE-2025-36852
GHSA Identifier GHSA-rrr2-jcr8-7q3x
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-829: Inclusion of Functionality from Untrusted Control Sphere
Affected Product @nx/azure cache
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-36852

To remediate this vulnerability, upgrade all affected @nx/azure cache dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@nx/azure-cache fixed: Latest secure release
npm install @nx/azure-cache@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @nx/azure-cache

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-36852, inspect your project dependencies using npm:

npm ls @nx/azure-cache

Analyze the terminal output to locate any version of @nx/azure cache in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls @nx/azure-cache command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere, where the product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere. In @nx/azure cache, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A critical security vulnerability exists in remote cache extensions for common build systems utilizing bucket-based remote cache (such as those using Amazon S3, Google Cloud Storage, or similar object storage) that allows any contributor with pull request privileges to inject compromised artifacts from an untrusted environment into trusted production environments without detection.  The vulnerability exploits a fundamental design flaw in the "first-to-cache wins" principle, where artifacts built in untrusted environments (feature branches, pull requests) can poison the cache used by trusted environments (protected branches, production deployments).  This attack bypasses all traditional security measures including encryption, access controls, and checksum validation because the poisoning occurs during the artifact construction phase, before any security measures are applied.

CVE-2025-36852 Affected @nx/azure cache Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
@nx/azure-cache
npm
≤ 4.0.0

References

Frequently Asked Questions

What is CVE-2025-36852?
CVE-2025-36852 is a security vulnerability in @nx/azure cache involving @nx/azure-cache Vulnerable to Build Cache Poisoning via Untrusted Pull Requests under CWE-829: Inclusion of Functionality from Untrusted Control Sphere.
Which @nx/azure cache versions are affected?
Affected versions include releases prior to current release patches across affected packages: @nx/azure-cache.
What version fixes CVE-2025-36852?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is @nx/azure-cache affected?
Yes, @nx/azure-cache is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2025-36852?
CVE-2025-36852 is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere (The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.).
How can I check npm dependencies for CVE-2025-36852?
Run the dependency tree command: 'npm ls @nx/azure-cache'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rrr2-jcr8-7q3x",
  "modified" : "2025-10-14T19:16:59Z",
  "published" : "2025-06-10T21:31:23Z",
  "aliases" : [ "CVE-2025-36852" ],
  "summary" : "@nx/azure-cache Vulnerable to Build Cache Poisoning via Untrusted Pull Requests",
  "details" : "A critical security vulnerability exists in remote cache extensions for common build systems utilizing bucket-based remote cache (such as those using Amazon S3, Google Cloud Storage, or similar object storage) that allows any contributor with pull request privileges to inject compromised artifacts from an untrusted environment into trusted production environments without detection. \n\nThe vulnerability exploits a fundamental design flaw in the \"first-to-cache wins\" principle, where artifacts built in untrusted environments (feature branches, pull requests) can poison the cache used by trusted environments (protected branches, production deployments). \n\nThis attack bypasses all traditional security measures including encryption, access controls, and checksum validation because the poisoning occurs during the artifact construction phase, before any security measures are applied.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/S:P/AU:Y/R:U/V:C/RE:M/U:Red"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@nx/azure-cache"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "4.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-36852"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nrwl/nx"
  }, {
    "type" : "WEB",
    "url" : "https://nx.app/files/cve-2025-06"
  }, {
    "type" : "WEB",
    "url" : "https://nx.dev/blog/creep-vulnerability-build-cache-security"
  }, {
    "type" : "WEB",
    "url" : "https://nx.dev/docs/reference/remote-cache-plugins/azure-cache/overview"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-829" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-14T19:16:59Z",
    "nvd_published_at" : "2025-06-10T20:15:22Z"
  }
}