Axios Flaws Let Attackers Bypass Proxy Controls and Trigger SSRF Attacks
Axios disclosed seven high-severity flaws, including HTTP/2 SSRF proxy bypass; attackers could reach internal services and cloud metadata; patched in 1.20.0.
Prototype pollution in Axios toFormData options
Axios, a promise-based HTTP client for the browser and Node.js, mishandles form serialization in toFormData when inherited options come from prototype pollution. A separate same-process prototype-pollution flaw can supply inherited dots, indexes, metaTokens, maxDepth, visitor, or Blob values before an object is serialized. Those inherited options can change field names and how data is interpreted, maxDepth can force the request to fail, and Blob can change value handling; a polluted visitor runs only if the attacker already has the stronger ability to inject a function. Versions from 0.28.0 before 0.34.0 and from 1.15.1 before 1.20.0 are affected and are fixed in 0.34.0 and 1.20.0. It is not in CISA KEV, and no public proof-of-concept or in-the-wild exploitation is known.
What to do: Upgrade Axios to 0.34.0 (0.x line) or 1.20.0 (1.x line) or later. Also remove any same-process prototype-pollution sources, because this bug only matters when an attacker can already pollute Object.prototype with options such as dots, indexes, metaTokens, maxDepth, visitor, or Blob before form serialization.
| Product | Affected |
|---|---|
| Axios | 0.28.0 up to but not including 0.34.0, and 1.15.1 up to but not including 1.20.0 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Axios is a promise-based HTTP client for the browser and Node.js. From 0.28.0 until 0.34.0 and 1.15.1 until 1.20.0, ToFormData processes inherited serialization options and visitor properties supplied through prototype pollution. A separate same-process prototype-pollution flaw supplies inherited dots, indexes, metaTokens, maxDepth, visitor, or Blob values before object serialization. The inherited options alter toFormData field naming and data interpretation, maxDepth can force request failure, Blob changes value handling, and a polluted visitor can execute when an attacker already has the stronger ability to inject a function. Serialized field naming and data interpretation can change, maxDepth can cause request failure, Blob can alter value handling, and a polluted visitor can execute under the stronger function-injection primitive. This issue is fixed in versions 0.34.0 and 1.20.0.
Axios disclosed seven high-severity flaws, including HTTP/2 SSRF proxy bypass; attackers could reach internal services and cloud metadata; patched in 1.20.0.
Today 1.3K readers · 1.9K views · 362 reads · all time 300K views