GHSA-x3cc-x39p-42qx

fast-xml-parser vulnerable to Prototype Pollution through tag or attribute name

En bref

Publiée
Mise à jour
CVE
CVE-2021-26920, CVE-2023-26920
Alias
GHSA-793h-6f7r-6qvm
CVSS_V3
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Description

### 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

Paquets affectés

PaquetVersions
npm · fast-xml-parserintroduced 0, fixed 4.1.2

Références

Sources

SourceLicence
OSV.devCC-BY 4.0 — GitHub Advisory Database