CVE-2026-54078: Java Documentbuilderfactory Chained Newdocumentbuilder Xxe

Directly calling DocumentBuilderFactory.newInstance().newDocumentBuilder() creates a DocumentBuilder from an unconfigured DocumentBuilderFactory, leaving XML External Entity (XXE) processing enabled by default. Configure feature flags on a DocumentBuilderFactory instance (such as disabling DTDs) or use a secure XML builder helper.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Java
greprules fetch cve-2026-54078-java-documentbuilderfactory-chained-newdocumentbuilder-xxe --engine opengrep

Description

Directly calling DocumentBuilderFactory.newInstance().newDocumentBuilder() creates a DocumentBuilder from an unconfigured DocumentBuilderFactory, leaving XML External Entity (XXE) processing enabled by default. Configure feature flags on a DocumentBuilderFactory instance (such as disabling DTDs) or use a secure XML builder helper.