CVE-2026-54082: Java Xxe Chained Documentbuilderfactory

Directly chaining `DocumentBuilderFactory.newInstance().newDocumentBuilder()` prevents configuring the XML parser to restrict XML External Entities (XXE). An attacker can provide malicious XML data leading to local file disclosure or SSRF. Instantiate the factory separately, apply security features (e.g., `setFeature("http://apache.org/xml/features/disallow-

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

Description

Directly chaining `DocumentBuilderFactory.newInstance().newDocumentBuilder()` prevents configuring the XML parser to restrict XML External Entities (XXE). An attacker can provide malicious XML data leading to local file disclosure or SSRF. Instantiate the factory separately, apply security features (e.g., `setFeature("http://apache.org/xml/features/disallow-