Improper Encoding or Escaping of Output Affecting axios package, versions <0.31.1>=1.0.0 <1.15.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.03% (10th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Encoding or Escaping of Output vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-AXIOS-16298055
  • published26 Apr 2026
  • disclosed24 Apr 2026
  • creditAugust829

Introduced: 24 Apr 2026

NewCVE-2026-42040  (opens in a new tab)
CWE-116  (opens in a new tab)

How to fix?

Upgrade axios to version 0.31.1, 1.15.1 or higher.

Overview

axios is a promise-based HTTP client for the browser and Node.js.

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output through the encode function in AxiosURLSearchParams. An attacker can smuggle a NUL byte into serialized query strings by supplying crafted parameter values, causing downstream parsers or backend components to misinterpret the request and potentially truncate or alter parameter handling.

Notes: Standard axios request flow (buildURL) uses its own encode function, which does NOT have this bug. Only triggered via direct AxiosURLSearchParams.toString() without an encoder, or via custom paramsSerializer delegation

CVSS Base Scores

version 4.0
version 3.1