
MLazarin161759 (Community Member) asked a question.
Reference (CWE ID 611)
Hello
Veracode static report showing below highlighted line as vulnerable. Input (body) is a XML of type String. Sample java code uses JAXBContext to parse and XMLInputFactory follows OWASP recommendation to disable DTD. Could you please review and advise? Thanks
XMLInputFactory xmlInputFactory = XMLInputFactory.newFactory();
xmlInputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
xmlInputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
final XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(new StringReader(body));
JAXBContext jaxbContext = JAXBContext.newInstance(OrderResponse.class);
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
return (OrderResponse) jaxbUnmarshaller.unmarshal(xmlStreamReader);
.png)
Hello @MLazarin161759 (Community Member),
For this type of inquiry, I recommend contacting our technical support team. Please include the information in this post and any additional information or files that can assist the engineer reviewing the case.
Here's how you can log a case:
Duncan,
Application Security Consultant
Hello @MLazarin161759 (Community Member)
I have exactly the same issue, did you manage to solve it?