CVE-2026-54079: Java Insecure Documentbuilderfactory Chaining

Chaining `DocumentBuilderFactory.newInstance().newDocumentBuilder()` prevents secure configuration of the XML parser, leaving it vulnerable to XML External Entity (XXE) injection. Instantiate the factory separately and disable DTDs and external entities before creating the DocumentBuilder.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Java
greprules fetch cve-2026-54079-java-insecure-documentbuilderfactory-chaining --engine opengrep

Description

Chaining `DocumentBuilderFactory.newInstance().newDocumentBuilder()` prevents secure configuration of the XML parser, leaving it vulnerable to XML External Entity (XXE) injection. Instantiate the factory separately and disable DTDs and external entities before creating the DocumentBuilder.