CVE-2026-40991: XML External Entity (XXE) injection when documenting untrusted XML content
Vulnerability summary
CVE-2026-40991 is a medium (CVSS 5.9) vulnerability in broadcom spring_rest_docs. EPSS estimates a 0.22% chance of exploitation in the next 30 days, higher than 13.7% of scored vulnerabilities.
Not severe (CVSS 5.9, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 09-06-2026PublishedVulnerability first disclosed.
- 27-06-2026Last modifiedVulnerability information updated.
Description
When using spring-restdocs-webtestclient or spring-restdocs-restassured to document a remote API accessed over HTTP, an attacker who compromises the API or tricks the user into documenting a malicious API can perform an XXE injection attack when the documentation-generating tests are next executed. Affected versions: Spring REST Docs 4.0.0; 3.0.0 through 3.0.5; 2.0.0.RELEASE through 2.0.8.RELEASE.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · MavenEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L
- NVDNIST5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L
EPSS trend
Probability
0.22%
Chance of exploitation in the next 30 days
Percentile
14%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.22% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Org.springframework.restdocs2 products
- spring-restdocs-restassured≥ 4.0.0, < 4.0.1 | ≥ 3.0.0, < 3.0.6 | ≤ 2.0.8.RELEASE
- spring-restdocs-webtestclient≥ 4.0.0, < 4.0.1 | ≥ 3.0.0, < 3.0.6 | ≤ 2.0.8.RELEASE
Broadcom1 product
- spring_rest_docs≥ 2.0.0, < 2.0.9 | ≥ 3.0.0, < 3.0.5.1 | 4.0.0
Spring1 product
- spring rest docs≥ 4.0.0, < 4.0.0.1 | ≥ 3.0.0, < 3.0.5.1 | ≥ 2.0.0.RELEASE, < 2.0.9.RELEASE
3 vendors · 4 products