fix: update fast-xml-parser 4.4.1 → 4.5.4 (CVE-2026-25896)#55
Merged
adrienpessu merged 2 commits intomainfrom Apr 2, 2026
Merged
fix: update fast-xml-parser 4.4.1 → 4.5.4 (CVE-2026-25896)#55adrienpessu merged 2 commits intomainfrom
adrienpessu merged 2 commits intomainfrom
Conversation
Agent-Logs-Url: https://github.com/advanced-security/GSSAR/sessions/291000a7-9b3d-4108-9d40-651510fced9b Co-authored-by: adrienpessu <7055334+adrienpessu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix entity encoding bypass in fast-xml-parser
fix: update fast-xml-parser 4.4.1 → 4.5.4 (CVE-2026-25896)
Apr 2, 2026
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.
fast-xml-parser≤4.4.1 allows DOCTYPE entity names containing regex metacharacters (e.g.,.) to shadow built-in XML entities (<,&, etc.), enabling XSS and injection attacks. Patched in 4.5.4.fast-xml-parseris a transitive dep via@aws-sdk/core→@aws-sdk/client-ssm. It is not reachable through untrusted input — the SDK uses it only to parse trusted AWS service responses — so this is a scanner-compliance update.Changes
package.json— Addedoverrides(npm) andresolutions(yarn) to pinfast-xml-parserto4.5.4package-lock.json— Regenerated vianpm install; resolvesfast-xml-parserto4.5.4yarn.lock— Entry updated to4.5.4with correct integrity hash; reference in@aws-sdk/coredeps updated to matchOriginal prompt
This section details the Dependabot vulnerability alert you should resolve
<alert_title>fast-xml-parser has an entity encoding bypass via regex injection in DOCTYPE entity names</alert_title>
<alert_description># Entity encoding bypass via regex injection in DOCTYPE entity names
Summary
A dot (
.) in a DOCTYPE entity name is treated as a regex wildcard during entity replacement, allowing an attacker to shadow built-in XML entities (<,>,&,",') with arbitrary values. This bypasses entity encoding and leads to XSS when parsed output is rendered.Details
The fix for CVE-2023-34104 addressed some regex metacharacters in entity names but missed
.(period), which is valid in XML names per the W3C spec.In
DocTypeReader.js, entity names are passed directly toRegExp():An entity named
l.produces the regex/&l.;/gwhere.matches any character, including thetin<. Since DOCTYPE entities are replaced before built-in entities, this shadows<entirely.The same issue exists in
OrderedObjParser.js:81(addExternalEntities), and in the v6 codebase -EntitiesParser.jshas avalidateEntityNamefunction with a character blacklist, but.is not included:Shadowing all 5 built-in entities
l./&l.;/g<g./&g.;/g>am./&am.;/g&quo./&quo.;/g"apo./&apo.;/g'PoC
No special parser options needed -
processEntities: trueis the default.When an app renders
result.root.textin a page (e.g.innerHTML, template interpolation, SSR), the injected<img onerror>fires.&can be shadowed too:Impact
This is a complete bypass of XML entity encoding. Any application that parses untrusted XML and uses the output in HTML, SQL, or other injection-sensitive contexts is affected.
</>/&/"/'with arbitrary stringsSuggested fix
Escape regex metacharacters before constructing the replacement regex:
For v6, add
.to the blacklist invalidateEntityName:Severity
CWE-185 (Incorrect Regular Expression)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N - 9.3 (CRITICAL)
Entity decoding is a fundamental trust boundary in XML processing. This completely undermines it with no preconditions.</alert_description>
critical
https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-m7jm-9gc2-mpf2 https://github.com/NaturalIntelligence/fast-xml-parser/commit/943ef0eb1b2d3284e72dd74f44a042ee9f07026e https://github.com/NaturalIntelligence/fast-xml-parser/commit/ddcd0acf26ddd682cb0dc15a2bd6aa3b96bb1e69 https://github.com/NaturalIntelligence/fast-xml-parser/releases/tag/v5.3.5 https://nvd.nist.gov/vuln/detail/CVE-2026-25896 https://github.com/advisories/GHSA-m7jm-9gc2-mpf2GHSA-m7jm-9gc2-mpf2, CVE-2026-25896
fast-xml-parser
npm
<vulnerable_versions>4.4.1</vulnerable_versions>
<patched_version>4.5.4</patched_version>
<manifest_path>functions/helpers/getSecretDetails/yarn.lock</manifest_path>
<task_instructions>Resolve this alert by updating the affected package to a non-vulnerable version. Prefer the lowest non-vulnerable version (see the patched_version field above) over the latest to minimize breaking changes. Include a Reachability Assessment section in the PR description. Review the alert_description field to understand which APIs, features, or configurations are affected, then search the codebase for usage of those specific it...