Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-40991: CWE-611: Improper Restriction of XML External Entity Reference in Spring Spring REST Docs

0
Medium
VulnerabilityCVE-2026-40991cvecve-2026-40991cwe-611
Published: Tue Jun 09 2026 (06/09/2026, 23:46:33 UTC)
Source: CVE Database V5
Vendor/Project: Spring
Product: 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

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/10/2026, 00:26:27 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses