Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2589

XML External Entity (XXE) vulnerability

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.11
    • 3.6.0, 3.4.13, 3.5.2
    • structure
    • None

    Description

      Found this from a security vulnerability scan. The following usage in gremlin-core package allows reading XML input stream and could potentially lead to XXE attack.

      In general, when XML input containing a reference to an external entity is processed by a weakly configured XML parser, it can lead to an XML external entity (XXE) attack.

      https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java#L396

      More details on the vulnerability: https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing

      How to Fix: https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#xmlinputfactory-a-stax-parser

       

      Setting these properties on the XML factory should fix this:

      inputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
      inputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
      

      Attachments

        Issue Links

          Activity

            People

              spmallette Stephen Mallette
              saikiranboga Saikiran Boga
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: