CVE-2026-40998
Spring Web Services: Jaxp13 XPath XXE via StreamSource and SAXSource
Description
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.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.springframework.ws » spring-xml | >= 3.1.0, <= 3.1.8>= 4.0.0, <= 4.0.18>= 4.1.0, < 4.1.4>= 5.0.0, < 5.0.2 | 4.1.4, 5.0.2 |
Blast radius
57% of the dependent artifacts (104) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 467 |
| 2 hops | 1,482 |
| 3 hops | 1,567 |
| 4 hops | 1,822 |
| 5 hops | 595 |
| 6 hops | 383 |
Most used dependents
- org.springframework.ws » spring-ws-core231 usages
- org.springframework.boot » spring-boot-starter-web-services83 usages
- com.consol.citrus » citrus-core69 usages
- org.springframework.ws » spring-ws-security40 usages
- org.springframework.integration » spring-integration-xml36 usages
- com.consol.citrus » citrus-java-dsl31 usages
- com.consol.citrus » citrus-jms31 usages
- com.consol.citrus » citrus-ws29 usages
- org.springframework.ws » spring-ws-test20 usages
- org.citrusframework » citrus-validation-xml20 usages
- org.springframework.boot » spring-boot-starter-test-classic20 usages
- org.springframework.integration » spring-integration-ws18 usages
- org.springframework.ws » spring-ws-support18 usages
- org.apache.camel » camel-allcomponents16 usages
- org.apache.camel » camel-spring-ws16 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
| Advisory | NVD CVE-2026-40998 | nvd.nist.gov |
| Package | spring-projects/spring-ws | github.com |
| Web | spring-projects/spring-ws commit eb8d66c | github.com |
| Web | security/cve-2026-40998 | spring.io |
