Skip to content
vetkitChecksChangelogDocumentation

vetkit.java.xxe.unhardened-parser

An XML parser is created and used without disabling DTDs/external entities (XXE).

Last updated:

Suite: Security

java

An XML parser is created and used without disabling DTDs/external entities (XXE).

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Disable DOCTYPE declarations on the factory (e.g. setFeature("http://apache.org/xml/features/disallow-doctype-decl", true), or XMLInputFactory.SUPPORT_DTD=false) before creating the parser.

References

Source: packages/engine/rules/sast/java.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.