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 cause XXE injection during test execution. Affected versions include Spring REST Docs 4. 0. 0, 3. 0. 0 through 3. 0. 5, and 2. 0.
AI Analysis
Technical Summary
Spring REST Docs versions 4.0.0, 3.0.0 to 3.0.5, and 2.0.0.RELEASE to 2.0.8.RELEASE are vulnerable to an XML External Entity (XXE) injection vulnerability (CWE-611). This occurs when using spring-restdocs-webtestclient or spring-restdocs-restassured to document remote APIs accessed over HTTP. If an attacker compromises the API or tricks the user into documenting a malicious API, they can exploit this vulnerability to perform XXE injection during the execution of documentation-generating tests. The vulnerability allows an attacker to cause high confidentiality impact by potentially exposing sensitive data, with no integrity impact and low availability impact. The CVSS 3.1 vector is AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L, indicating 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 is no vendor advisory or patch currently available, and no known exploits in the wild have been reported.
Potential Impact
Successful exploitation can lead to disclosure of sensitive information due to XXE injection when documenting a malicious or compromised remote API. The confidentiality impact is high, while integrity is not affected and availability impact is low. This vulnerability requires user interaction and has a high attack complexity, limiting ease of exploitation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid documenting untrusted or potentially compromised remote APIs using spring-restdocs-webtestclient or spring-restdocs-restassured. Review test configurations and consider additional input validation or XML parsing hardening if feasible.
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 cause XXE injection during test execution. Affected versions include Spring REST Docs 4. 0. 0, 3. 0. 0 through 3. 0. 5, and 2. 0.
CVSS v3.1
Score 5.9medium
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Spring REST Docs versions 4.0.0, 3.0.0 to 3.0.5, and 2.0.0.RELEASE to 2.0.8.RELEASE are vulnerable to an XML External Entity (XXE) injection vulnerability (CWE-611). This occurs when using spring-restdocs-webtestclient or spring-restdocs-restassured to document remote APIs accessed over HTTP. If an attacker compromises the API or tricks the user into documenting a malicious API, they can exploit this vulnerability to perform XXE injection during the execution of documentation-generating tests. The vulnerability allows an attacker to cause high confidentiality impact by potentially exposing sensitive data, with no integrity impact and low availability impact. The CVSS 3.1 vector is AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L, indicating 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 is no vendor advisory or patch currently available, and no known exploits in the wild have been reported.
Potential Impact
Successful exploitation can lead to disclosure of sensitive information due to XXE injection when documenting a malicious or compromised remote API. The confidentiality impact is high, while integrity is not affected and availability impact is low. This vulnerability requires user interaction and has a high attack complexity, limiting ease of exploitation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid documenting untrusted or potentially compromised remote APIs using spring-restdocs-webtestclient or spring-restdocs-restassured. Review test configurations and consider additional input validation or XML parsing hardening if feasible.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- vmware
- Date Reserved
- 2026-04-16T02:19:09.389Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a28a8028dd33fbd8595ef57
Added to database: 6/9/2026, 11:55:46 PM
Last enriched: 6/10/2026, 12:26:27 AM
Last updated: 6/10/2026, 5:16:12 AM
Views: 4
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.