CVE-2026-40998 Jaxp13 XPath XXE via StreamSource and SAXSource
Attackers can exploit XXE vulnerabilities in Spring Web Services by sending malicious XML payloads to applications evaluating XPath expressions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-40998?
CVE-2026-40998 is a high-severity vulnerability in Spring Web Services, published on 11 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-611
Which versions are affected by CVE-2026-40998?
8 open source packages ship an affected version, including org.springframework.ws:spring-xml. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.springframework.ws:spring-xml Maven | From 3.1.0 to 3.1.8 | None |
org.springframework.ws:spring-xml Maven | From 3.1.0 to 3.1.8 | None |
org.springframework.ws:spring-xml Maven | From 4.0.0 to 4.0.18 | None |
org.springframework.ws:spring-xml Maven | From 4.0.0 to 4.0.18 | None |
org.springframework.ws:spring-xml Maven | From 4.1.0 | 4.1.4 |
org.springframework.ws:spring-xml Maven | From 4.1.0 | 4.1.4 |
2 more packages
org.springframework.ws:spring-xml Maven | From 5.0.0 | 5.0.2 |
org.springframework.ws:spring-xml Maven | From 5.0.0 | 5.0.2 |
Products include Broadcom Spring Web Services.
How do I fix CVE-2026-40998?
Upgrade org.springframework.ws:spring-xml to a fixed version for your release line: 4.1.4 or 5.0.2.
Is CVE-2026-40998 being exploited?
There is no known exploitation of CVE-2026-40998 in the wild and no public exploit code.
Other vulnerabilities in Spring Web Services
- CVE-2019-3773 Spring Web Services XML External Entity Injection (XXE)
- CVE-2026-40999 Spring WS SSRF via unvalidated WS-Addressing reply destinations
- CVE-2026-40994 Wss4jSecurityInterceptor disables WS-I BSP validation by default
- CVE-2026-40995 X.509 authentication bypasses Spring Security account checks
- CVE-2026-40997 SOAP security faults leak Spring Security account state
Sources
Also known as CLSA-2026-1788350691, GHSA-2mpf-m756-hxjm, ROOT-APP-MAVEN-CVE-2026-40998.