Harden FormatterProfileReader against XXE and entity expansion attacks by gastaldi · Pull Request #400 · forge/roaster · GitHub
Skip to content

Harden FormatterProfileReader against XXE and entity expansion attacks#400

Merged
gastaldi merged 1 commit into
masterfrom
fix/xxe-formatterprofilereader
Jun 24, 2026
Merged

Harden FormatterProfileReader against XXE and entity expansion attacks#400
gastaldi merged 1 commit into
masterfrom
fix/xxe-formatterprofilereader

Conversation

@gastaldi

Copy link
Copy Markdown
Member

Summary

  • Harden SAXParserFactory in FormatterProfileReader to prevent XXE (CWE-611) and billion-laughs entity expansion (CWE-776) attacks
  • Add tests verifying that XXE and entity expansion payloads are rejected

Fixes #399

Test plan

  • testXXEAttackIsBlocked — verifies external entity payloads are rejected with IOException
  • testBillionLaughsAttackIsBlocked — verifies entity expansion payloads are rejected with IOException
  • Existing testFormatterProfileReaderTwoProfiles and testFormatterProfileReaderOneProfile still pass

@gastaldi gastaldi merged commit ffbc7cc into master Jun 24, 2026
4 checks passed
@gastaldi gastaldi deleted the fix/xxe-formatterprofilereader branch June 24, 2026 10:50
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.

XXE: FormatterProfileReader.fromEclipseXml parses InputStream through unhardened SAXParserFactory

1 participant