GitHub Advisoryadvisory · npm

GHSA-x3cc-x39p-42qx fast-xml-parser vulnerable to Prototype Pollution through tag or attribute name

MEDIUM Published 2023-06-13 Modified 2023-12-14 Official page ↗
Aliases
CVE-2023-26920
Ecosystem
npm
Packages
fast-xml-parser
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Weaknesses
CWE-1321
Reviewed
2023-06-13

Affected packages

• npm fast-xml-parser: < 4.1.2 → fixed in 4.1.2

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 = "hacked" 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

Related

Alias · CVE (1)

  • CVE-2023-26920 fast-xml-parser before 4.1.2 allows __proto__ for Prototype Pollution. vulnerability

Weakness · CWE (1)

  • CWE-1321 Improperly Controlled Modification of Object Prototype Attributes weakness

References