AI analysis
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.
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 |
Estimated exposure
massmillions of applications (Axios dependents; only listed versions plus a prototype-pollution primitive are exploitable) — Axios is one of the most widely used JavaScript HTTP clients, with very high npm download volume and millions of dependent browser and Node.js applications; only installs in the listed ranges that also have a separate prototype-pollution…
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Description
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.