CVE-2026-39865: Axios HTTP/2 Session Cleanup State Corruption Vulnerability
Summary
CVE-2026-39865: Axios HTTP/2 Session Cleanup State Corruption Vulnerability. Affects axios versions < 1.13.2. Fixed in 1.13.2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Axios is a popular JavaScript library used for making HTTP requests in both browser and Node.js environments. It simplifies the process of sending asynchronous HTTP requests to REST endpoints and performing CRUD operations. Axios supports various features such as interceptors, automatic JSON data transformation, and the ability to cancel requests. However, when HTTP/2 is enabled, a state corruption vulnerability exists in its session cleanup logic, which can be exploited by malicious servers.
Vulnerability Detail
The vulnerability in Axios arises from a flaw in the session cleanup logic within the Http2Sessions.getSession() method in lib/adapters/http.js. This flaw allows a malicious server to crash the client process by exploiting concurrent session closures. The issue is caused by improper control flow when removing sessions from the sessions array, leading to undefined behavior and potential crashes due to accessing invalid memory locations. This vulnerability affects all versions of Axios prior to 1.13.2 when HTTP/2 is enabled, resulting in a denial-of-service condition.
How To Fix
Latest published version: 1.20.0 as of 22 Oct 2026
npm install axios@1.20.0
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.13.2
This is the first release that contains the fix.
npm install axios@1.13.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using Axios with HTTP/2 enabled when connecting to untrusted or potentially malicious servers. This can help mitigate the risk of exploitation until the package is updated to a secure version.
Conclusion
The Axios HTTP/2 session cleanup state corruption vulnerability (CVE-2026-39865) poses a significant risk to applications using Axios with HTTP/2 enabled. It is crucial to update to version 1.13.2 or later to mitigate this risk. Additionally, using Vulert can help monitor your application for vulnerabilities in real-time.
See every vulnerability recorded for axios →
FAQ
The CVSS score of this vulnerability is 5.9, which is classified as Medium severity.
All versions of Axios prior to 1.13.2 are affected when HTTP/2 is enabled.
Exploitation of this vulnerability can lead to a denial-of-service condition, causing the Axios client process to crash.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application using the Vulert playground without any signup.
If you cannot update Axios right away, avoid using it with HTTP/2 enabled when connecting to untrusted servers to reduce the risk of exploitation.
Related vulnerabilities
Recent vulnerabilities recorded for axios.