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

Sigma (SIGMA.xml_external_entity_enabled) in XmlWalker.java: 88 #47

Open
StrongestNumber9 opened this issue Jun 24, 2024 · 0 comments
Open
Labels
bug Something isn't working Coverity Issues found by coverity

Comments

@StrongestNumber9
Copy link
Contributor

Describe the bug

*** CID 1594365:  Sigma  (SIGMA.xml_external_entity_enabled)
/src/main/java/com/teragrep/pth_06/planner/walker/XmlWalker.java: 88 in com.teragrep.pth_06.planner.walker.XmlWalker::fromString(XmlWalker, String)T()
82         public XmlWalker() {
83     
84         }
85     
86         public <T> T fromString(String inXml) throws Exception {
87             Object rv;
>>>     CID 1594365:  Sigma  (SIGMA.xml_external_entity_enabled)
>>>     Java API for XML processing's `DocumentBuilderFactory` or `SAXParserFactory` class has not been configured to prevent expansion of external entities during XML parsing. External entity expansion may cause a server-side request forgery, denial of service, exposure of sensitive data or unwanted server requests.
88             DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
89             DocumentBuilder loader = factory.newDocumentBuilder();
90             Document document = loader.parse(new InputSource(new StringReader(inXml)));
91     
92             DocumentTraversal traversal = (DocumentTraversal) document;
93             LOGGER.info("XmlWalker.fromString incoming:" + inXml);

Software version

3.0.1

@StrongestNumber9 StrongestNumber9 added bug Something isn't working Coverity Issues found by coverity labels Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Coverity Issues found by coverity
Projects
None yet
Development

No branches or pull requests

1 participant