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…
EPSS 0.2%top 87%

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: 06/09/2026 (06/09/2026, 23:46:33 UTC)
Source: CVE Database V5
Vendor/Project: Spring
Product: Spring REST Docs

Description

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.

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

Affected software

org.springframework.restdocs/spring-restdocs-webtestclient
pkg:maven/org.springframework.restdocs/spring-restdocs-webtestclient
Affected versions
=4.0.03.0.0 <3.0.62.0.0.RELEASE <=2.0.8.RELEASE
org.springframework.restdocs/spring-restdocs-restassured
pkg:maven/org.springframework.restdocs/spring-restdocs-restassured
Affected versions
=4.0.03.0.0 <3.0.62.0.0.RELEASE <=2.0.8.RELEASE

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/28/2026, 20:59:16 UTC

Technical Analysis

This vulnerability (CVE-2026-40991) involves improper restriction of XML External Entity references (CWE-611) in Spring REST Docs. Specifically, when using spring-restdocs-webtestclient or spring-restdocs-restassured to document a remote API accessed over HTTP, an attacker who either compromises the API or deceives the user into documenting a malicious API can perform an XXE injection attack. This attack occurs when the documentation-generating tests are executed, potentially allowing the attacker to cause high confidentiality impact without affecting integrity and with low availability impact. The affected versions are Spring REST Docs 4.0.0, 3.0.0 through 3.0.5, and 2.0.0.RELEASE through 2.0.8.RELEASE. No official patch or remediation level has been provided at this time.

Potential Impact

The vulnerability allows an attacker to perform an XML External Entity injection attack during the execution of documentation-generating tests that access a remote API over HTTP. This can lead to a high confidentiality impact, potentially exposing sensitive data. The integrity of the system is not impacted, and availability impact is low. There are no known exploits in the wild currently.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should exercise caution when documenting remote APIs accessed over HTTP, especially if the API source is untrusted or potentially compromised. Avoid documenting untrusted or suspicious APIs using spring-restdocs-webtestclient or spring-restdocs-restassured to mitigate risk.

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: 06/09/2026, 23:55:46 UTC

Last enriched: 06/28/2026, 20:59:16 UTC

Last updated: 07/31/2026, 19:22:58 UTC

Views: 63

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