Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. fast-xml-parser
  4. ›
  5. CVE-2023-26920

CVE-2023-26920: fast-xml-parser vulnerable to Prototype Pollution through tag or attribute name

June 13, 2023

Impact

As a part of this vulnerability, user was able to se code using __proto__ as a tag or attribute name.

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

References

  • gist.github.com/Sudistark/a5a45bd0804d522a1392cb5023aa7ef7
  • github.com/NaturalIntelligence/fast-xml-parser/commit/2b032a4f799c63d83991e4f992f1c68e4dd05804
  • github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-x3cc-x39p-42qx
  • github.com/advisories/GHSA-x3cc-x39p-42qx

Code Behaviors & Features

Detect and mitigate CVE-2023-26920 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 4.1.2

Fixed versions

  • 4.1.2

Solution

Upgrade to version 4.1.2 or above.

Source file

npm/fast-xml-parser/CVE-2023-26920.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:25 +0000.