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

- Severity: Low 3.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-24T17:40:31.125Z
- Modified: 2026-11-11T23:10:00.263Z
- Also known as: GHSA-xhjh-pmcv-23jw
- Weaknesses: CWE-116, CWE-626
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- axios axios: >= 1.0.0, < 1.15.1; < 0.31.1; before 0.31.1; from 1.0.0 before 1.15.1
- axios (npm): from 1.0.0 before 1.15.1; before 0.31.1

## Every score

- GitHub_M: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`
- GitHub: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`

## References

- <https://github.com/axios/axios/security/advisories/GHSA-xhjh-pmcv-23jw> (exploit, mitigation, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-42040> (advisory)
- <https://github.com/axios/axios> (package)

## Sources

- CVE List: [CVE-2026-42040](https://www.cve.org/CVERecord?id=CVE-2026-42040), CVE Terms of Use, modified 2026-04-27
- GitHub Advisory Database: [GHSA-xhjh-pmcv-23jw](https://github.com/advisories/GHSA-xhjh-pmcv-23jw), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-42040](https://nvd.nist.gov/vuln/detail/CVE-2026-42040), Public domain, modified 2026-11-11

---

Page: https://cve.day/CVE-2026-42040 · Whole record: https://cve.day/CVE-2026-42040.json · Rebuilt by cve.day 2026-11-25T22:59:19.561Z
