xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Krapf (JIRA)" <j...@apache.org>
Subject [jira] [Created] (BATIK-1139) SSRF through external DTD resolution
Date Mon, 07 Dec 2015 17:44:11 GMT
Lars Krapf created BATIK-1139:

             Summary: SSRF through external DTD resolution
                 Key: BATIK-1139
                 URL: https://issues.apache.org/jira/browse/BATIK-1139
             Project: Batik
          Issue Type: Bug
          Components: SVG Rasterizer
    Affects Versions: 1.8
            Reporter: Lars Krapf

The fix for XXE (BATIK-1018) seems to be incomplete. 
External DTD resolution should also be disabled in order to avoid attacks like SSRF or port-scanning
behind the firewall. 

See attached file (ssrf.svg) for an example. 

chaotic@m0lly:~$ nc -l 2323
GET / HTTP/1.1
User-Agent: Java/1.7.0_60-ea
Host: localhost:2323
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

To fix it you could disable the external DTD resolution altogether, using the document factory
configuration, i.e. 

dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);

See also [https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing|OWASP] for
more information on XXE.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org

View raw message