cve.bz

CVE-2026-42040 axios axios: Improper Encoding or Escaping of Output

3.7 lowExploit referenceEPSS 0.2%Fix available

Low (3.7) in axios axios. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in axios 0.31.1, 1.15.1.

On this page
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.

Severity

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
EPSS
0.2% (unchanged from 0.2% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 13th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2026-04-27. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-116 Improper Encoding or Escaping of Output
CWE-626 Null Byte Interaction Error (Poison Null Byte)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-42040 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-42040?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-42040?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-42040 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
axios:axiosbefore 0.31.1
axios:axiosfrom 1.0.0 before 1.15.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-xhjh-pmcv-23jwnpmaxios>=1.0.0 <1.15.11.15.1
GHSA-xhjh-pmcv-23jwnpmaxios<0.31.10.31.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13node-axiosno fix listedDEBIAN-CVE-2026-42040
Debian14node-axios1.15.2-1DEBIAN-CVE-2026-42040
Ubuntu25.10, 26.10, Pro:20.04:LTS and 3 morenode-axiosno fix listedUBUNTU-CVE-2026-42040

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Low.

Red Hat's statement

Red Hat rates this vulnerability as Low impact with a CVSS score of 3.7, matching the upstream assessment. The vulnerable code only runs when URL search parameters are built through the AxiosURLSearchParams helper. Standard axios request methods (get, post, etc.) do not use this helper, and Red Hat products that bundle axios construct HTTP parameters from trusted internal inputs rather than unsanitized user data. For exploitation, an attacker would need to inject null bytes into user input that reaches this specific helper, which is unlikely in typical deployments. If a raw null byte reaches a downstream system that treats it as a string terminator, it could cause unexpected behavior such as parameter truncation, path traversal, or security filter bypass. The practical risk remains low because exploitation requires both unsanitized user input flowing into the AxiosURLSearchParams helper and a backend that interprets null bytes differently from the sending application.

Red Hat's mitigation

Validate and sanitize user-controlled input to remove null bytes before passing it to URL parameter construction. Standard axios request methods (axios.get, axios.post with a params object) do not use the vulnerable AxiosURLSearchParams helper and are not affected.

ProductPackageStateAdvisory
Red Hat Ceph Storage 9.2rhceph/rhceph-9-rhel10:1790843527Fixed 2026-10-21RHSA-2026:86618
Cryostat 4axiosFix deferred
Cryostat 4cryostat-openshift-console-plugin-npmFix deferred
Gatekeeper 3gatekeeper/gatekeeper-rhel9Fix deferred
Migration Toolkit for Applications 8mta/mta-ui-rhel8Fix deferred
Migration Toolkit for Applications 8mta/mta-ui-rhel9Fix deferred
Migration Toolkit for Containersrhmtc/openshift-migration-ui-rhel8Fix deferred
Multicluster Engine for Kubernetesmulticluster-engine/console-mce-rhel9Fix deferred
Network Observability Operatornetwork-observability/network-observability-console-plugin-compat-rhel9Fix deferred
Network Observability Operatornetwork-observability/network-observability-console-plugin-pf4-rhel9Fix deferred
Network Observability Operatornetwork-observability/network-observability-console-plugin-pf5-rhel9Fix deferred
Network Observability Operatornetwork-observability/network-observability-console-plugin-rhel9Fix deferred
OpenShift Pipelinesopenshift-pipelines/pipelines-hub-ui-rhel8Fix deferred
OpenShift Pipelinesopenshift-pipelines/pipelines-hub-ui-rhel9Fix deferred
OpenShift Service Mesh 2openshift-service-mesh/kiali-ossmc-rhel8Fix deferred
OpenShift Service Mesh 2openshift-service-mesh/kiali-rhel8Fix deferred
OpenShift Service Mesh 3openshift-service-mesh/kiali-operator-bundleFix deferred
OpenShift Service Mesh 3openshift-service-mesh/kiali-ossmc-rhel9Fix deferred
OpenShift Service Mesh 3openshift-service-mesh/kiali-rhel9Fix deferred
OpenShift Service Mesh 3openshift-service-mesh/kiali-rhel9-operatorFix deferred
70 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-42040.

Attack patterns (CAPEC)

  • CAPEC-73 User-Controlled Filename Likelihood: High · Severity: High
  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-104 Cross Zone Scripting Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON