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
- Android
- Aws-lambda
- Castor
- Java-jwt
- Jax-rs
- Jboss
- Jdo
- Jedis
- Jjwt
- Jsch
- Kryo
- Lang
- Micronaut
- Mongo
- Mongodb
- Mysql
- Okhttp
- Rmi
- Servlets
- Spring
- Log-http-headers
- Security
- Security
- Audit
- Audit
- Castor-deserialization-deepsemgrep
- Hibernate-sqli
- Injection
- Jdbctemplate-sqli
- Jdo-sqli
- Jpa-sqli
- Kryo-deserialization-deepsemgrep
- Objectinputstream-deserialization-spring
- Spring-sqli-deepsemgrep
- Spring-tainted-code-execution
- Spring-tainted-ldap-injection
- Spring-tainted-xmldecoder
- Tainted-ssrf-spring-add
- Tainted-ssrf-spring-format
- Xstream-anytype-deserialization-deepsemgrep
- Xxe
- Tainted-documentbuilderfactory-xxe-spring
- Tainted-saxbuilder-xxe-spring
- Tainted-saxparser-xxe-spring
- Tainted-saxreader-xxe-spring
- Tainted-saxtransformerfactory-xxe-spring
- Tainted-schemafactory-xxe-spring
- Tainted-validator-xxe-spring
- Tainted-xmlreader-xxe-spring
- Simple-command-injection-direct-input
- Spring-tainted-path-traversal
- Tainted-html-string-responsebody
- Thymeleaf
- Xstream
- Javascript
- Json
- Kotlin
- Ocaml
- Php
- Problem-based-packs
- Python
- Ruby
- Rust
- Scala
- Solidity
- Swift
- Terraform
- Typescript
- Yaml
Tainted xmlreader xxe spring
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) or XIncludes 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 the XMLReader parser with parser.setFeature(http://apache.org/xml/features/disallow-doctype-decl, true)
. Alternatively, the following configurations also provide protection against XXE attacks. parser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD,"")
, configuring the both of parser.setFeature("http://xml.org/sax/features/external-general-entities", false)
and parser.setFeature("http://xml.org/sax/features/external-parameter-entities", false)
. For more information, see: Java XXE prevention
Likelihood: MEDIUM
Confidence: HIGH
CWE:
- CWE-611: Improper Restriction of XML External Entity Reference
OWASP:
- A04:2017 - XML External Entities (XXE)
- A05:2021 - Security Misconfiguration