Skip to content

HV-2105 Fix XXE Vulnerability in Schema Loading #1617

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

Closed
wants to merge 1 commit into from

Conversation

simei2k
Copy link
Contributor

@simei2k simei2k commented May 11, 2025

This PR addresses a critical security vulnerability in the [loadSchema] method related to XML External Entity (XXE) attacks. By restricting access to external DTDs and schemas, we prevent potential server-side exploits.

This vulnerability was also found in 3dcitydb/importer-exporter@8ab7fb6, corresponding to CVE-2018-10054 and fixed.

References:

  1. https://nvd.nist.gov/vuln/detail/cve-2018-10054
  2. 3dcitydb/importer-exporter@8ab7fb6

[Please describe here what your change is about]

  1. Added explicit restrictions to prevent external DTD access:
  2. Added explicit restrictions to prevent external schema access:
  3. Implemented proper exception handling for older XML parsers that might not support these security properties

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on licensing, please check here.


This PR addresses a critical security vulnerability in the [loadSchema] method related to XML External Entity (XXE) attacks. By restricting access to external DTDs and schemas, we prevent potential server-side exploits.

This vulnerability was also found in 3dcitydb/importer-exporter@8ab7fb6, corresponding to CVE-2018-10054 and fixed.

References:
1. https://nvd.nist.gov/vuln/detail/cve-2018-10054
2. 3dcitydb/importer-exporter@8ab7fb6
@hibernate-github-bot
Copy link

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HV-\d+
    ↳ Offending commits: [cd2b665]

› This message was automatically generated.

@marko-bekhta
Copy link
Member

Thanks for the patch.
This was already addressed in 63a3819

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