CVE-2026-40991 json
XML External Entity (XXE) injection when documenting untrusted XML content
published 2026-06-09 5 mo ago modified 2026-08-12 2 mo ago also GHSA-6rpq-6vv2-5222 , EUVD-2026-35885
- cvss
- 5.9
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 12%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- maven org.springframework.restdocs:spring-restdocs-webtestclient 3.0.6, 4.0.1
- maven org.springframework.restdocs:spring-restdocs-restassured 3.0.6, 4.0.1
- Spring Spring REST Docs 2.0.9.RELEASE, 3.0.5.1, 4.0.0.1
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 4 mo ago
Exploit prediction
0.22% chance of exploitation in the next 30 days, higher than 12% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L |
| GitHub | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| maven | org.springframework.restdocs:spring-restdocs-webtestclient | >=4.0.0, <4.0.1 >=3.0.0, <3.0.6 <=2.0.8.RELEASE |
4.0.1 3.0.6 |
| maven | org.springframework.restdocs:spring-restdocs-restassured | >=4.0.0, <4.0.1 >=3.0.0, <3.0.6 <=2.0.8.RELEASE |
4.0.1 3.0.6 |
Affected products
- Spring Spring REST Docs
Classification
- Weakness
-
- CWE-611 Improper Restriction of XML External Entity Reference
References
Sources
- CVE List CVE-2026-40991
- GitHub Advisory GHSA-6rpq-6vv2-5222
- NVD CVE-2026-40991
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.