# CVE-2026-42040: Axios: Null Byte Injection via Reverse-Encoding in AxiosURLSearchParams

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 3.7
- **CVSS:** 3.7 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.27% (percentile 13, 2026-11-28)
- **CWE:** CWE-116, CWE-626
- **Aliases:** GHSA-xhjh-pmcv-23jw
- **Published:** 2026-04-24T17:40:31.125Z
- **Modified:** 2026-11-11T23:10:00.263Z

## Who should check

- Projects that depend on npm package axios (\>= 1.0.0, \< 1.15.1)
- Anyone running axios \>= 1.0.0, \< 1.15.1; \< 0.31.1

## Description

Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, the encode() function in lib/helpers/AxiosURLSearchParams.js contains a character mapping (charMap) at line 21 that reverses the safe percent-encoding of null bytes. After encodeURIComponent('\\x00') correctly produces the safe sequence %00, the charMap entry '%00': '\\x00' converts it back to a raw null byte. Primary impact is limited because the standard axios request flow is not affected. This vulnerability is fixed in 1.15.1 and 0.31.1.

## Affected and fixed versions

- npm `axios`: affected \>= 1.0.0, \< 1.15.1; fixed 1.15.1, 0.31.1 (osv)
- axios: \>= 1.0.0, \< 1.15.1; \< 0.31.1 (cvelist)

## Mitigation

- Upgrade axios to one of 1.15.1, 0.31.1 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-42040. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-42040.md
Affected: axios >= 1.0.0, < 1.15.1
Fixed in: 1.15.1, 0.31.1

Steps:
1. Search this machine and project for axios (npm), axios: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-42040 being exploited?

There is no confirmed exploitation: CVE-2026-42040 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.27% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-42040?

Low: CVSS 3.7 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-42040?

axios \>= 1.0.0, \< 1.15.1.

### Is there a fix for CVE-2026-42040?

Yes. Fixed in 1.15.1, 0.31.1. Upgrade axios to one of 1.15.1, 0.31.1 (or later in the same release line).

### How do I check if I'm affected by CVE-2026-42040?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/axios/axios/security/advisories/GHSA-xhjh-pmcv-23jw>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-42040>
- other: <https://github.com/axios/axios>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-42040>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-xhjh-pmcv-23jw> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-42040> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-42040>
