{"id":"CVE-2026-27942","published":"2026-02-26T01:22:11Z","modified":"2026-06-23T15:50:01Z","title":"fast-xml-parser has stack overflow in XMLBuilder with preserveOrder","vendor":"NaturalIntelligence","product":"fast-xml-parser","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.7,"severity":"LOW","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00781,"percentile":0.52409,"provenance":"source"},"cwes":[{"id":"CWE-120","name":"Buffer Copy without Checking Size of Input"}],"references":[{"url":"https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-fj3w-jwp8-x2g3","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/NaturalIntelligence/fast-xml-parser/pull/791","tags":["x_refsource_MISC"]},{"url":"https://github.com/NaturalIntelligence/fast-xml-parser/commit/c13a961910f14986295dd28484eee830fa1a0e8a","tags":["x_refsource_MISC"]}],"priority":{"score":12.4,"factors":[{"name":"EPSS percentile","points":10.48},{"name":"CVSS severity","points":1.89}]},"vendorSlug":"naturalintelligence","affectedVersions":[{"vendor":"NaturalIntelligence","product":"fast-xml-parser","versions":["< 5.3.8"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-02-26T15:48:57.198872Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"fast-xml-parser","vulnerableRanges":[">=5.0.0, <5.3.8",">=4.0.0-beta.0, <4.5.4"],"patched":["5.3.8","4.5.4"],"from":["GHSA-fj3w-jwp8-x2g3"],"provenance":"source"}],"summary":{"text":"The flaw is in the XML builder of the fast-xml-parser library from NaturalIntelligence, a JavaScript package for validating, parsing and building XML, affecting versions before 5.3.8 when the builder is used with preserveOrder:true. An attacker with network access and no authentication or user interaction, able to supply input data that is passed to the builder, can crash the application with a stack overflow, causing a denial of service; the workaround is to use preserveOrder:false or to validate input before it reaches the builder.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:03:41Z"},"euvd":{"id":"EUVD-2026-8811","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-naturalintelligence-fast-xml-parser-cve-2026-27942","children":[{"from":"CVE-2026-27942","to":"CVE-2026-41650","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/xmlbuilder/orderedJs2Xml.js"],"commits":["https://github.com/NaturalIntelligence/fast-xml-parser/commit/c13a961910f14986295dd28484eee830fa1a0e8a","https://github.com/NaturalIntelligence/fast-xml-parser/commit/e561c2188607a108a9a8d9b6428902a28aad8fb0"],"basis":"shared function","functions":["arrToStr"]}]}],"packageHistory":[{"cve":"CVE-2024-41818","published":"2024-07-29","fixed":"4.4.1","kev":false,"link":{"from":"CVE-2024-41818","to":"CVE-2026-27942","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:fast-xml-parser","fromFixed":"4.4.1","toFixed":"4.5.4","daysApart":577}]}},{"cve":"CVE-2026-25128","published":"2026-01-30","fixed":"5.3.4","kev":false},{"cve":"CVE-2026-25896","published":"2026-02-20","fixed":"5.3.5","kev":false},{"cve":"CVE-2026-26278","published":"2026-02-19","fixed":"5.3.6","kev":false,"link":{"from":"CVE-2026-26278","to":"CVE-2026-27942","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:fast-xml-parser","fromFixed":"5.3.6","toFixed":"5.3.8","daysApart":7}]}},{"cve":"CVE-2026-27942","published":"2026-02-26","fixed":"5.3.8","kev":false},{"cve":"CVE-2026-33036","published":"2026-03-20","fixed":"5.5.6","kev":false,"link":{"from":"CVE-2026-27942","to":"CVE-2026-33036","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:fast-xml-parser","fromFixed":"5.3.8","toFixed":"5.5.6","daysApart":22},{"kind":"version-step","provenance":"source","package":"npm:fast-xml-parser","fromFixed":"4.5.4","toFixed":"4.5.5","daysApart":22}]}},{"cve":"CVE-2026-33349","published":"2026-03-24","fixed":"5.5.7","kev":false,"link":{"from":"CVE-2026-27942","to":"CVE-2026-33349","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:fast-xml-parser","fromFixed":"4.5.4","toFixed":"4.5.5","daysApart":26}]}},{"cve":"CVE-2026-41650","published":"2026-05-07","fixed":"5.7.0","kev":false}],"package":"npm:fast-xml-parser"}}