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

XXE in apikit #547

Closed
prodigysml opened this issue Mar 25, 2020 · 1 comment
Closed

XXE in apikit #547

prodigysml opened this issue Mar 25, 2020 · 1 comment

Comments

@prodigysml
Copy link

While reading the code in the apikit project we (@n33dle and I) identified a vulnerability we wanted to raise. The vulnerability is an XXE vulnerability (https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing) and can be identified in the lines of code below:

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
setFeatures(factory);
factory.setNamespaceAware(true);
try
{
DocumentBuilder builder = factory.newDocumentBuilder();
//Setting error handler to null to avoid logs generated by the parser.
builder.setErrorHandler(null);
return builder.parse(source);

@juanchib
Copy link
Contributor

The attack is prevented at setFeatures() method, tests for this are found at org.mule.module.apikit.schema.XxeAttackTestCase , thanks for the adivse.

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

No branches or pull requests

2 participants