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

CVE-2026-27942: fast-xml-parser has stack overflow in XMLBuilder with preserveOrder

February 26, 2026 (updated March 6, 2026)

Application crashes with stack overflow when user use XML builder with prserveOrder:true for following or similar input

[{
'foo': [
{ 'bar': [{ '@_V': 'baz' }] }
]
}]

Cause: arrToStr was not validating if the input is an array or a string and treating all non-array values as text content. What kind of vulnerability is it? Who is impacted?

References

  • github.com/NaturalIntelligence/fast-xml-parser
  • github.com/NaturalIntelligence/fast-xml-parser/commit/c13a961910f14986295dd28484eee830fa1a0e8a
  • github.com/NaturalIntelligence/fast-xml-parser/pull/791
  • github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-fj3w-jwp8-x2g3
  • github.com/advisories/GHSA-fj3w-jwp8-x2g3
  • nvd.nist.gov/vuln/detail/CVE-2026-27942

Code Behaviors & Features

Detect and mitigate CVE-2026-27942 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 starting from 4.0.0-beta.0 before 4.5.4, all versions starting from 5.0.0 before 5.3.8

Fixed versions

  • 5.3.8
  • 4.5.4

Solution

Upgrade to versions 4.5.4, 5.3.8 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

Source file

npm/fast-xml-parser/CVE-2026-27942.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sun, 08 Nov 2026 00:16:42 +0000.