Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ private final String processFpr(RawResponse r, Function<JsonNode, Boolean> consu

private final void processAuditFvdl(InputStream is, Function<JsonNode, Boolean> consumer) throws XMLStreamException {
var factory = XMLInputFactory.newInstance();
// Disable DTD processing and external entity resolution to prevent XXE attacks
factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
// Allow DTD processing (FVDL rule descriptions may declare internal-only entities,
// e.g. &reg;/&trade;), but block resolution of external entities/DTDs to prevent XXE (CWE-611).
factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
factory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
var reader = factory.createXMLStreamReader(is);
while(reader.hasNext()) {
Expand Down
Loading