Skip to content

[core] Disallow external entity expansions/DTD in XML parsing - #7261

Merged
adangel merged 1 commit into
pmd:mainfrom
adangel:fix-GHSA-9hm5-r2r7-hjcq-xml-parser
Oct 29, 2026
Merged

adangel merged 1 commit into
pmd:mainfrom
adangel:fix-GHSA-9hm5-r2r7-hjcq-xml-parser

Conversation

@adangel

@adangel adangel commented Oct 29, 2026

Copy link
Copy Markdown
Member

Describe the PR

Fixes GHSA-9hm5-r2r7-hjcq
Fixes GHSA-wv72-2ccf-28gj

  • centralized all the factory creators in XmlUtil
  • disable DTD parsing by default to prevent XXE attacks

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

- centralized all the factory creators in XmlUtil
- disable DTD parsing by default to prevent XXE attacks
@adangel adangel added this to the 7.29.0 milestone Oct 29, 2026
@pmd-actions-helper

Copy link
Copy Markdown
Contributor

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
There are 0 changed duplications, 0 new duplications and 0 removed duplications.
There are 0 changed CPD errors, 0 new CPD errors and 0 removed CPD errors.

Regression Tester Report

(comment created at 2026-10-29 14:41:03+00:00 for b0007dd)

@adangel
adangel merged commit 71d38f5 into pmd:main Oct 29, 2026
13 checks passed
@adangel
adangel deleted the fix-GHSA-9hm5-r2r7-hjcq-xml-parser branch October 29, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant