Axios – Denial of Service (Application Crash via __proto__ Key Injection)
| Field | Value |
|---|---|
| CVE ID | CVE-2026-25639 |
| Affected Product | Axios (Node.js HTTP client library) |
| Vulnerable Versions | All versions prior to 1.13.5 |
| Fixed Version | 1.13.5 and later |
| CVSS v3.1 Base Score | 7.5 (High) |
| CVSS Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| Severity | High |
| Exploitability | Low complexity, network-accessible |
| Exploit Availability | Public technical write-ups and proof-of-concept demonstrations available for educational and defensive validation purposes |
| Impact | Application crash leading to service disruption or repeated restart loops |
Overview
CVE-2026-25639 is a Denial of Service vulnerability in Axios, a widely used HTTP client library for Node.js. The issue occurs due to improper handling of special object keys—specifically __proto__—inside Axios’s internal configuration merging logic.
When an attacker-controlled JSON object containing a __proto__ property is passed into Axios configuration merging functions, the application may throw a TypeError. If that error is not handled properly, the Node.js process may terminate, resulting in a service crash.
This vulnerability does not directly lead to remote code execution or data exposure. However, the availability impact is significant because services relying on Axios for outbound HTTP requests may become unstable or repeatedly crash.
Technical Root Cause
The issue exists in Axios’s internal mergeConfig function.
During configuration merging:
- Axios attempts to determine how properties should be merged.
- A lookup is performed against an internal merge strategy object.
- If the incoming object contains a property named
__proto__, JavaScript’s prototype chain behavior is triggered. - The lookup unintentionally resolves to
Object.prototype. - The code then attempts to treat that resolved object as a function.
- A
TypeErroris thrown. - If uncaught, the Node.js runtime exits.
This behavior is specific to how JavaScript handles object prototypes and property resolution.
The problem occurs when:
- Untrusted JSON input is accepted.
- The JSON is parsed into an object.
- That object is passed directly into Axios as configuration or merged into an Axios config object.
- The application does not sanitize keys before merging.
Attack Scenario
The vulnerability can be exploited remotely when the following conditions are met:
- The application exposes an API endpoint accepting JSON input.
- User-controlled JSON is parsed using
JSON.parse(). - The parsed object is directly or indirectly passed into Axios configuration.
- The application does not filter special object keys such as
__proto__.
An attacker can send a crafted JSON payload containing a __proto__ property.
When the server processes that request and attempts to make an outbound HTTP call using Axios with the attacker-controlled object, the process crashes.
In containerized environments, this may lead to repeated restart loops.
In traditional deployments, it may cause service downtime until manual restart.
Educational Proof-of-Concept
The following payload demonstrates the triggering condition. This should only be tested in controlled lab environments.
Example Payload
{
"__proto__": {
"test": "value"
}
}
If this object is merged directly into Axios configuration on a vulnerable version, the application may throw a TypeError similar to:
TypeError: Object prototype may only be an Object or null
or
TypeError: mergeMap[configKey] is not a function
Depending on runtime conditions, the process may terminate.
No authentication is required to trigger the issue if the vulnerable endpoint is publicly exposed.
Impact Analysis
Availability
High impact. The service may crash immediately.
Confidentiality
No direct impact.
Integrity
No direct data modification.
Operational Risk
- Repeated crash loops
- Auto-scaling instability
- Health check failures
- Increased CPU usage due to restart cycles
- Possible cascading failures if the service is upstream of other systems
Exploit Characteristics
- Attack Vector: Network
- Privileges Required: None
- User Interaction: None
- Exploitation Complexity: Low
- Reliability: High if input is directly merged
The exploit does not require advanced payload crafting. A simple JSON object containing the __proto__ key is sufficient.
Detection Guidance
Detection should focus on two areas:
- Suspicious inbound JSON payloads
- Application crash indicators
Indicators of Compromise
Application Logs
- Stack traces referencing:
mergeConfigObject.prototypeTypeError
- Unexpected Node.js process termination
- Repeated restart messages from process managers (PM2, systemd, Docker)
Web Logs
- Requests containing
"__proto__"in request bodies - Sudden spike in POST requests before crashes
Container Logs
- Restart loops
- Health check failures
Detection Rules
HTTP Payload Monitoring
index=web sourcetype=access_combined
| search request_body="*__proto__*"
| stats count by clientip, uri, http_method
Application Crash Detection
index=app_logs
| search "TypeError" AND "mergeConfig"
| stats count by host, source
Suspicious JSON Key Detection
http.request.body:*"__proto__"*
Crash Pattern
message:*TypeError* AND message:*mergeConfig*
WAF Detection Logic
Trigger alert if:
- Content-Type is
application/json - AND request body contains
__proto__ - AND request method is POST, PUT, or PATCH
Log Sources to Monitor
- Web server access logs (Nginx, Apache)
- Node.js stdout/stderr logs
- Container runtime logs
- API gateway logs
- WAF logs
- Reverse proxy logs
- SIEM aggregated application logs
MITRE ATT&CK Mapping
Technique: T1499 – Endpoint Denial of Service
The application process is intentionally forced to terminate.
If used as part of a broader attack campaign:
- T1190 – Exploit Public-Facing Application
Remediation
Immediate Action
Upgrade Axios to version 1.13.5 or later.
Official patch link:
https://github.com/axios/axios/releases/tag/v1.13.5
Temporary Mitigation
- Reject JSON payloads containing the
__proto__key. - Sanitize parsed objects before merging into configuration.
- Implement strict allowlists for configuration properties.
- Avoid directly passing user-supplied objects into Axios calls.
Example validation logic:
if (Object.prototype.hasOwnProperty.call(userInput, "__proto__")) {
throw new Error("Invalid property detected");
}
Secure Coding Recommendations
- Use schema validation (Joi, Zod, Ajv) before processing JSON.
- Never merge raw user objects into internal configuration structures.
- Implement centralized input sanitization middleware.
- Enable structured logging for crash visibility.
- Configure automatic alerting for repeated process restarts.
Post-Patch Validation
After upgrading:
- Confirm installed version:
npm list axios - Run regression tests.
- Validate that test payload containing
__proto__no longer causes crash. - Monitor logs for 24–48 hours for abnormal restarts.
Risk Assessment Summary
CVE-2026-25639 should be treated as a high-priority availability issue in environments where:
- User-controlled JSON is accepted
- Axios configuration is dynamically built from request data
- Services are public-facing
Although no data theft or remote code execution is involved, repeated crashes can disrupt business operations and impact dependent services.
Final Takeaway
This vulnerability highlights a recurring issue in JavaScript ecosystems involving prototype chain behavior and unsafe object merging. Even though the issue results in a crash rather than code execution, it demonstrates how seemingly small logic flaws can produce significant operational impact.
Immediate patching is strongly recommended. Detection rules should be deployed in parallel to identify attempted exploitation.
