fast-xml-parser has stack overflow in XMLBuilder with preserveOrder
Low severity
GitHub Reviewed
Published
Feb 25, 2026
in
NaturalIntelligence/fast-xml-parser
•
Updated Mar 6, 2026
Package
Affected versions
>= 5.0.0, < 5.3.8
>= 4.0.0-beta.0, < 4.5.4
Patched versions
5.3.8
4.5.4
Description
Published by the National Vulnerability Database
Feb 26, 2026
Published to the GitHub Advisory Database
Feb 26, 2026
Reviewed
Feb 26, 2026
Last updated
Mar 6, 2026
Impact
Application crashes with stack overflow when user use XML builder with
prserveOrder:truefor following or similar inputCause:
arrToStrwas 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?
Patches
Yes in 5.3.8
Workarounds
Use XML builder with
preserveOrder:falseor check the input data before passing to builder.References
Are there any links users can visit to find out more?
References