CVE-2026-40991
MEDIUM 5.9CVSS 3.1Spring REST Docs REST Assured & WebFlux are vulnerable to Improper Restriction of XML External Entity Reference
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.
- Published
- 10 Jun 2026
- Last modified
- 12 Aug 2026
- Assigned by
- security@vmware.com
- NVD status
- Analyzed
- Weakness
- CWE-611
- Also known as
- GHSA-6rpq-6vv2-5222
- Sources
- NVDJSONOSV GHSA-6rpq-6vv2-5222JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security@vmware.com (Secondary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | broadcom | spring_rest_docscpe:2.3:a:broadcom:spring_rest_docs:*:*:*:*:*:*:*:* |
>= 2.0.0, < 2.0.9 | 2.0.9 |
| NVD | broadcom | spring_rest_docscpe:2.3:a:broadcom:spring_rest_docs:*:*:*:*:*:*:*:* |
>= 3.0.0, < 3.0.5.1 | 3.0.5.1 |
| NVD | broadcom | spring_rest_docscpe:2.3:a:broadcom:spring_rest_docs:4.0.0:-:*:*:*:*:*:* |
= 4.0.0 | |
| OSV | Maven | org.springframework.restdocs:spring-restdocs-webtestclient | >= 4.0.0, < 4.0.1 | 4.0.1 |
| OSV | Maven | org.springframework.restdocs:spring-restdocs-webtestclient | >= 3.0.0, < 3.0.6 | 3.0.6 |
| OSV | Maven | org.springframework.restdocs:spring-restdocs-webtestclient | <= 2.0.8.RELEASE | |
| OSV | Maven | org.springframework.restdocs:spring-restdocs-restassured | >= 4.0.0, < 4.0.1 | 4.0.1 |
| OSV | Maven | org.springframework.restdocs:spring-restdocs-restassured | >= 3.0.0, < 3.0.6 | 3.0.6 |
| OSV | Maven | org.springframework.restdocs:spring-restdocs-restassured | <= 2.0.8.RELEASE |
References
- https://spring.io/security/cve-2026-40991 · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-40991 · ADVISORY
- https://github.com/spring-projects/spring-restdocs · PACKAGE
- https://github.com/spring-projects/spring-restdocs/releases/tag/v3.0.6 · WEB
- https://github.com/spring-projects/spring-restdocs/releases/tag/v4.0.1 · WEB
History
- 25 Nov 2026 21:03 UTC · NVD: first stored (published 10 Jun 2026)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 10 Jun 2026)