CVE-2026-40991: CWE-611: Improper Restriction of XML External Entity Reference in Spring Spring REST Docs
CVE-2026-40991 is an XML External Entity (XXE) injection vulnerability in Spring REST Docs when using spring-restdocs-webtestclient or spring-restdocs-restassured to document remote APIs accessed over HTTP. An attacker who compromises or tricks the user into documenting a malicious API can exploit this vulnerability during the execution of documentation-generating tests. The vulnerability affects Spring REST Docs versions 4.0.0, 3.0.0 through 3.0.5, and 2.0.0.RELEASE through 2.0.8.RELEASE. The CVSS score is 5.9 (medium severity). A patch is available for this vulnerability.
AI Analysis
Technical Summary
This vulnerability arises from improper restriction of XML External Entity references (CWE-611) in Spring REST Docs components spring-restdocs-webtestclient and spring-restdocs-restassured. When these components document a remote API accessed over HTTP, an attacker who either compromises the API or deceives the user into documenting a malicious API can cause an XXE injection attack during the next execution of the documentation-generating tests. This can lead to high confidentiality impact with limited integrity and availability impact. The affected versions explicitly include 4.0.0, 3.0.0 through 3.0.5, and 2.0.0.RELEASE through 2.0.8.RELEASE. The vendor has confirmed a patch is available, although no specific remediation details or advisories were provided in the input data.
Potential Impact
Successful exploitation can result in disclosure of confidential information due to XXE injection when documenting a malicious or compromised remote API. The CVSS vector indicates network attack vector, high attack complexity, no privileges required, user interaction required, unchanged scope, high confidentiality impact, no integrity impact, and low availability impact. There are no known exploits in the wild at this time.
Mitigation Recommendations
A patch is available for this vulnerability. Users should apply the official fix from the Spring project to the affected versions of Spring REST Docs. Since the vendor advisory content is not provided, check the Spring project or official Spring REST Docs release notes for the exact patched versions and update accordingly. Avoid documenting untrusted or potentially malicious remote APIs until patched.
CVE-2026-40991: CWE-611: Improper Restriction of XML External Entity Reference in Spring Spring REST Docs
Description
CVE-2026-40991 is an XML External Entity (XXE) injection vulnerability in Spring REST Docs when using spring-restdocs-webtestclient or spring-restdocs-restassured to document remote APIs accessed over HTTP. An attacker who compromises or tricks the user into documenting a malicious API can exploit this vulnerability during the execution of documentation-generating tests. The vulnerability affects Spring REST Docs versions 4.0.0, 3.0.0 through 3.0.5, and 2.0.0.RELEASE through 2.0.8.RELEASE. The CVSS score is 5.9 (medium severity). A patch is available for this vulnerability.
CVSS v3.1
Score 5.9medium
Affected software
Spring
Spring REST Docs
pkg:maven/org.springframework.restdocs/spring-restdocs-webtestclientpkg:maven/org.springframework.restdocs/spring-restdocs-restassuredRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability arises from improper restriction of XML External Entity references (CWE-611) in Spring REST Docs components spring-restdocs-webtestclient and spring-restdocs-restassured. When these components document a remote API accessed over HTTP, an attacker who either compromises the API or deceives the user into documenting a malicious API can cause an XXE injection attack during the next execution of the documentation-generating tests. This can lead to high confidentiality impact with limited integrity and availability impact. The affected versions explicitly include 4.0.0, 3.0.0 through 3.0.5, and 2.0.0.RELEASE through 2.0.8.RELEASE. The vendor has confirmed a patch is available, although no specific remediation details or advisories were provided in the input data.
Potential Impact
Successful exploitation can result in disclosure of confidential information due to XXE injection when documenting a malicious or compromised remote API. The CVSS vector indicates network attack vector, high attack complexity, no privileges required, user interaction required, unchanged scope, high confidentiality impact, no integrity impact, and low availability impact. There are no known exploits in the wild at this time.
Mitigation Recommendations
A patch is available for this vulnerability. Users should apply the official fix from the Spring project to the affected versions of Spring REST Docs. Since the vendor advisory content is not provided, check the Spring project or official Spring REST Docs release notes for the exact patched versions and update accordingly. Avoid documenting untrusted or potentially malicious remote APIs until patched.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- vmware
- Date Reserved
- 2026-04-16T02:19:09.389Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a28a8028dd33fbd8595ef57
Added to database: 06/09/2026, 23:55:46 UTC
Last enriched: 08/12/2026, 16:20:12 UTC
Last updated: 09/13/2026, 10:01:30 UTC
Views: 87
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.