Skip to content

Harden EppXmlSanitizer against XXE and entity expansion#3117

Merged
CydeWeys merged 1 commit into
google:masterfrom
CydeWeys:fix-xxe-sanitizer
Jun 30, 2026
Merged

Harden EppXmlSanitizer against XXE and entity expansion#3117
CydeWeys merged 1 commit into
google:masterfrom
CydeWeys:fix-xxe-sanitizer

Conversation

@CydeWeys

@CydeWeys CydeWeys commented Jun 29, 2026

Copy link
Copy Markdown
Member

Configure a throwing XMLResolver on XMLInputFactory in XmlTransformer to act as an additional defense-in-depth security layer against XML External Entity (XXE) and entity expansion/resolution attacks. This prevents resolution of external and internal entities in StAX parsing pipelines, ensuring that malformed payloads containing entity definitions are safely blocked and rejected.

Also add a unit test to EppXmlSanitizerTest verifying that EPP messages containing DTD and external entities fail parsing and fall back safely to their Base64 representation.

TAG=agy
CONV=610c2358-a99f-4605-94cd-ff0d4ee08176


This change is Reviewable

@CydeWeys
CydeWeys requested a review from gbrodman June 29, 2026 18:21
@CydeWeys
CydeWeys enabled auto-merge June 29, 2026 18:21
Configure a throwing XMLResolver on XMLInputFactory in XmlTransformer
to act as an additional defense-in-depth security layer against XML
External Entity (XXE) and entity expansion/resolution attacks.
This prevents resolution of external and internal entities in StAX
parsing pipelines, ensuring that malformed payloads containing entity
definitions are safely blocked and rejected.

Also add a unit test to EppXmlSanitizerTest verifying that EPP
messages containing DTD and external entities fail parsing and fall
back safely to their Base64 representation.

TAG=agy
CONV=610c2358-a99f-4605-94cd-ff0d4ee08176

BUG= http://b/529387728
@CydeWeys
CydeWeys force-pushed the fix-xxe-sanitizer branch from 48b7dfa to 1330953 Compare June 29, 2026 18:22

@gbrodman gbrodman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gbrodman reviewed 2 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on CydeWeys).

@CydeWeys
CydeWeys added this pull request to the merge queue Jun 30, 2026
Merged via the queue into google:master with commit eda0f7a Jun 30, 2026
16 checks passed
@CydeWeys
CydeWeys deleted the fix-xxe-sanitizer branch June 30, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants