Get Started
- CodeAnt AI
- Control Center
- Pull Request Review
- IDE
- Compliance
- Anti-Patterns
- Code Governance
- Infrastructure Security Database
- Application Security Database
- Apex
- Bash
- C
- Clojure
- Cpp
- Csharp
- Dockerfile
- Elixir
- Fingerprints
- Generic
- Go
- Html
- Java
- Javascript
- Json
- Kotlin
- Generic
- Java-jwt
- Jedis
- Jjwt
- Ktor
- Lang
- Mongo
- Okhttp
- Openai
- Spring
- Sql
- Xxe
- Documentbuilderfactory-xxe-parameter-entity
- Documentbuilderfactory-xxe
- Saxbuilder-xxe-parameter-entities
- Saxbuilder-xxe
- Saxparserfactory-xxe-parameter-entity
- Saxparserfactory-xxe
- Saxreader-xxe-parameter-entities
- Saxreader-xxe
- Saxtransformerfactory-xxe-stylesheet
- Saxtransformerfactory-xxe
- Schemafactory-xxe-schema
- Schemafactory-xxe
- Validator-xxe
- Xmlreader-xxe-parameter-entities
- Xmlreader-xxe
- Ocaml
- Php
- Problem-based-packs
- Python
- Ruby
- Rust
- Scala
- Solidity
- Swift
- Terraform
- Typescript
- Yaml
Saxreader xxe
The application is using an XML parser that has not been safely configured. This might lead to XML External Entity (XXE) vulnerabilities when parsing user-controlled input. An attacker can include document type definitions (DTDs) which can interact with internal or external hosts. XXE can lead to other vulnerabilities, such as Local File Inclusion (LFI), Remote Code Execution (RCE), and Server-side request forgery (SSRF), depending on the application configuration. An attacker can also use DTDs to expand recursively, leading to a Denial-of-Service (DoS) attack, also known as a Billion Laughs Attack
. It is our recommendation to secure this parser against XXE attacks by configuring PARSERwith‘PARSER.setFeature(http://apache.org/xml/features/disallow-doctype-decl, true). Alternatively, the following configurations also provide protection against XXE attacks.
$PARSER.setFeature(“http://xml.org/sax/features/external-general-entities”, false)`. The best defense against XXE is to have an XML parser that supports disabling DTDs. Limiting the use of external entities from the start can prevent the parser from being used to process untrusted XML files. Reducing dependencies on external resources is also a good practice for performance reasons. It is difficult to guarantee that even a trusted XML file on your server or during transmission has not been tampered with by a malicious third-party. For more information, see: Java XXE prevention
Likelihood: MEDIUM
Confidence: MEDIUM
CWE:
- CWE-776: Improper Restriction of Recursive Entity References in DTDs (‘XML Entity Expansion’)
OWASP:
- A04:2017 - XML External Entities (XXE)
- A05:2021 - Security Misconfiguration