LOW 2.7

CVE-2026-27942

fast-xml-parser has stack overflow in XMLBuilder with preserveOrder

Description

Impact

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?

Patches

Yes in 5.3.8

Workarounds

Use XML builder with preserveOrder:false or check the input data before passing to builder.

References

Are there any links users can visit to find out more?

Affected Maven artifacts (2)

ArtifactAffected versionsFixed in
org.mvnpm » fast-xml-parservia npm fast-xml-parser
>= 4.0.0-beta.0, < 4.5.4>= 5.0.0, < 5.3.8
4.5.4, 5.3.8
org.webjars.npm » fast-xml-parservia npm fast-xml-parser
>= 4.0.0-beta.0, < 4.5.4>= 5.0.0, < 5.3.8
4.5.4, 5.3.8

Blast radius

2affected artifacts
34affected versions
40dependent artifacts (est.)
1,169dependent versions

37% of the dependent artifacts (15) still pull an affected version in their latest release.

DepthDependent versions
Direct
7
2 hops
431
3 hops
413
4 hops
267
5 hops
51

Most used dependents

Computed from the dependency graph of build 20261127.1117 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.

Other ecosystems

Also affects npm (1 package) . See all on OSV