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

- Severity: Low 2.7 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.53%, higher than 46% of CVEs (2026-12-01)
- Published: 2026-02-26T01:22:11.383Z
- Modified: 2026-09-10T03:50:34.765Z
- Also known as: GHSA-fj3w-jwp8-x2g3
- Weaknesses: CWE-120
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

fast-xml-parser allows users to validate XML, parse XML to JS object, or build XML from JS object without C/C++ based libraries and no callback. Prior to version 5.3.8, the application crashes with stack overflow when user use XML builder with `preserveOrder:true`. Version 5.3.8 fixes the issue. As a workaround, use XML builder with `preserveOrder:false` or check the input data before passing to builder.

(As written by CVE List.)

## Affected

- NaturalIntelligence fast-xml-parser: < 5.3.8; before 4.5.4; from 5.0.0 before 5.3.8
- fast-xml-parser (npm): from 5.0.0 before 5.3.8; from 4.0.0-beta.0 before 4.5.4

## Every score

- GitHub_M: CVSS:4.0 2.7 Low `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U`
- GitHub: CVSS:4.0 Low `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-fj3w-jwp8-x2g3> (vendor-advisory, web)
- <https://github.com/NaturalIntelligence/fast-xml-parser/pull/791> (issue-tracking, patch, web)
- <https://github.com/NaturalIntelligence/fast-xml-parser/commit/c13a961910f14986295dd28484eee830fa1a0e8a> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-27942> (advisory)
- <https://github.com/NaturalIntelligence/fast-xml-parser> (package)

## Sources

- CVE List: [CVE-2026-27942](https://www.cve.org/CVERecord?id=CVE-2026-27942), CVE Terms of Use, modified 2026-06-23
- GitHub Advisory Database: [GHSA-fj3w-jwp8-x2g3](https://github.com/advisories/GHSA-fj3w-jwp8-x2g3), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-27942](https://nvd.nist.gov/vuln/detail/CVE-2026-27942), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-27942 · Whole record: https://cve.day/CVE-2026-27942.json · Rebuilt by cve.day 2026-11-25T22:59:14.939Z
