{"id":"CVE-2026-27942","aliases":["CVE-2026-27942","GHSA-fj3w-jwp8-x2g3"],"related":[],"kind":"vulnerability","state":"published","title":"fast-xml-parser has stack overflow in XMLBuilder with preserveOrder","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"### Impact\nApplication crashes with stack overflow when user use XML builder with `prserveOrder:true` for following or similar input \n\n```\n[{\n    'foo': [\n        { 'bar': [{ '@_V': 'baz' }] }\n    ]\n}]\n```\n\nCause: `arrToStr` was not validating if the input is an array or a string and treating all non-array values as text content.\n_What kind of vulnerability is it? Who is impacted?_\n\n### Patches\nYes in 5.3.8\n\n### Workarounds\nUse XML builder with `preserveOrder:false` or check the input data before passing to builder.\n\n### References\n[_Are there any links users can visit to find out more?_](https://github.com/NaturalIntelligence/fast-xml-parser/pull/791)","format":"markdown","source":"ghsa"},{"lang":"es","text":"fast-xml-parser permite a los usuarios validar XML, analizar XML a objeto JS o construir XML a partir de un objeto JS sin librerías basadas en C/C++ y sin callback. Antes de la versión 5.3.8, la aplicación falla con desbordamiento de pila cuando el usuario utiliza el constructor de XML con 'preserveOrder:true'. La versión 5.3.8 soluciona el problema. Como solución alternativa, utilice el constructor de XML con 'preserveOrder:false' o verifique los datos de entrada antes de pasarlos al constructor.","source":"nvd"}],"published":"2026-02-26T01:22:11.383Z","modified":"2026-09-10T03:50:34.765Z","severity":{"scorer":"GitHub_M","scheme":"CVSS: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","score":2.7,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS: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","score":2.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS: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","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-120"],"affected":[{"ranges":[{"version":"< 5.3.8","status":"affected"}],"vendor":"NaturalIntelligence","product":"fast-xml-parser","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"5.0.0","status":"affected","fixed":"5.3.8"}],"ecosystem":"npm","package":"fast-xml-parser","purl":"pkg:npm/fast-xml-parser","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.0.0-beta.0","status":"affected","fixed":"4.5.4"}],"ecosystem":"npm","package":"fast-xml-parser","purl":"pkg:npm/fast-xml-parser","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.5.4"},{"status":"affected","introduced":"5.0.0","fixed":"5.3.8"}],"vendor":"naturalintelligence","product":"fast-xml-parser","cpe":"cpe:2.3:a:naturalintelligence:fast-xml-parser:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-fj3w-jwp8-x2g3","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/NaturalIntelligence/fast-xml-parser/pull/791","tags":["issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/NaturalIntelligence/fast-xml-parser/commit/c13a961910f14986295dd28484eee830fa1a0e8a","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27942","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/NaturalIntelligence/fast-xml-parser","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-02-26T15:48:57.198Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-27942","url":"https://www.cve.org/CVERecord?id=CVE-2026-27942","licence":"CVE Terms of Use","modified":"2026-06-23T15:50:01.617Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fj3w-jwp8-x2g3","url":"https://github.com/advisories/GHSA-fj3w-jwp8-x2g3","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:34.765Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-27942","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27942","licence":"Public domain","modified":"2026-06-17T10:27:56.887Z"}],"updatedAt":"2026-11-25T22:59:14.939Z","epss":{"score":0.00535,"percentile":0.46617,"date":"2026-12-01T12:00:22.000Z"}}