chore(deps): update dependency fast-xml-parser to v5.5.7 [security]#719
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dependency fast-xml-parser to v5.5.7 [security]#719renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
5.5.6→5.5.7GitHub Vulnerability Alerts
CVE-2026-33349
Summary
The
DocTypeReaderin fast-xml-parser uses JavaScript truthy checks to evaluatemaxEntityCountandmaxEntitySizeconfiguration limits. When a developer explicitly sets either limit to0— intending to disallow all entities or restrict entity size to zero bytes — the falsy nature of0in JavaScript causes the guard conditions to short-circuit, completely bypassing the limits. An attacker who can supply XML input to such an application can trigger unbounded entity expansion, leading to memory exhaustion and denial of service.Details
The
OptionsBuilder.jscorrectly preserves a user-supplied value of0using nullish coalescing (??):However,
DocTypeReader.jsuses truthy evaluation to check these limits. Because0is falsy in JavaScript, the entire guard expression short-circuits tofalse, and the limit is never enforced:The execution flow is:
processEntities: { maxEntityCount: 0, maxEntitySize: 0 }intending to block all entity definitions.OptionsBuilder.normalizeProcessEntitiespreserves the0values via??(correct behavior).DocTypeReader.readDocTypeevaluatesthis.options.maxEntityCount && ...— since0is falsy, the entire condition isfalse.DocTypeReader.readEntityExpevaluatesthis.options.maxEntitySize && ...— same result.PoC
Expected output:
Impact
maxEntityCount: 0ormaxEntitySize: 0, intending to prohibit entities entirely.0receive no protection — the opposite of their intent. This creates a false sense of security.0are affected. The default configuration (maxEntityCount: 100,maxEntitySize: 10000) is not vulnerable. Theenabled: falseoption correctly disables entity processing entirely and is not affected.Recommended Fix
Replace the truthy checks in
DocTypeReader.jswith explicit type checks that correctly treat0as a valid numeric limit:Workaround
If you don't want to processed the entities, keep the processEntities flag to false instead of setting any limit to 0.
Release Notes
NaturalIntelligence/fast-xml-parser (fast-xml-parser)
v5.5.7Compare Source
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.