CVE-2026-40998: Spring Web Services: Jaxp13 XPath XXE via StreamSource and SAXSource
Jaxp13XPathTemplate evaluated XPath expressions for StreamSource and SAXSource inputs using a code path that parsed attacker-controlled XML with the JDK's default DocumentBuilderFactory behavior instead of Spring's hardened parser configuration. Applications that evaluate XPath against untrusted XML payloads could therefore be exposed to XML External Entity (XXE) style attacks.
Published Jun 11, 2026 · Updated Aug 21, 2026
Affected packages
org.springframework.ws:spring-xml
- Ecosystem
- Maven
- Affected
- >= 5.0.0, <= 5.0.1
- Fixed in
- 5.0.2
- Check
mvn dependency:tree -Dincludes=org.springframework.ws:spring-xml
org.springframework.ws:spring-xml
- Ecosystem
- Maven
- Affected
- >= 4.1.0, <= 4.1.3
- Fixed in
- 4.1.4
- Check
mvn dependency:tree -Dincludes=org.springframework.ws:spring-xml
org.springframework.ws:spring-xml
- Ecosystem
- Maven
- Affected
- >= 4.0.0, <= 4.0.18
- Fixed in
- No patched version yet
- Check
mvn dependency:tree -Dincludes=org.springframework.ws:spring-xml
org.springframework.ws:spring-xml
- Ecosystem
- Maven
- Affected
- >= 3.1.0, <= 3.1.8
- Fixed in
- No patched version yet
- Check
mvn dependency:tree -Dincludes=org.springframework.ws:spring-xml
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Jaxp13XPathTemplate evaluated XPath expressions for StreamSource and SAXSource inputs using a code path that parsed attacker-controlled XML with the JDK's default DocumentBuilderFactory behavior instead of Spring's hardened parser configuration. Applications that evaluate XPath against untrusted XML payloads could therefore be exposed to XML External Entity (XXE) style attacks.
Affected versions: Spring Web Services 5.0.0 through 5.0.1; 4.1.0 through 4.1.3; 4.0.0 through 4.0.18; 3.1.0 through 3.1.8.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
