Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a potential XXE Vulnerability #1488

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Conversation

ymo-sci
Copy link
Contributor

@ymo-sci ymo-sci commented Dec 9, 2024

Description

Fix a potential XXE vulnerability via setting Feature Secure Processing
https://docs.oracle.com/javase/8/docs/technotes/guides/security/jaxp/jaxp.html#feature-for-secure-processing
Nicer and more current documentation:
https://docs.oracle.com/en/java/javase/23/security/java-api-xml-processing-jaxp-security-guide.html
In a nutshell, this prevents access to external entities and set limit while processing xml. As this feature is rarely required and the limits are reasonable high, we expect no problems. But testing the xml processing in products is recommended, after this change got included.

Additional Notes

Checklist

  • Code change has been tested and works locally
  • Code was formatted via IntelliJ and follows SonarLint & best practices
  • Patch Tasks: Is local execution of Patch Tasks necessary? If so, please also mark the PR with the tag.

@ymo-sci ymo-sci added the 🐛 Bugfix Contains only a small fix for an existing bug label Dec 9, 2024
Without this one con possible include files from the web or the local system like //etc/passwd in an XML file and read it in e.g. an import job or in the frontend or pdf in an svg

via setting Feature Secure Processing
https://docs.oracle.com/javase/8/docs/technotes/guides/security/jaxp/jaxp.html#feature-for-secure-processing as recommended in https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#jaxb-unmarshaller

- fixes: SIRI-1037
@ymo-sci ymo-sci force-pushed the feature/ymo/SIRI-1037-xxe branch from bb8a1e5 to 0fba6c5 Compare December 10, 2024 10:41
@ymo-sci ymo-sci merged commit fa4bcb8 into develop Dec 11, 2024
3 checks passed
@ymo-sci ymo-sci deleted the feature/ymo/SIRI-1037-xxe branch December 11, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bugfix Contains only a small fix for an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants