Every CVE Search/ Get API key

CVE-2026-40991

XML External Entity (XXE) injection when documenting untrusted XML content

5.9 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
None
Availability
Low

Exploit likelihood

0.22%Up 0.2 points since Jun 10, 2026
90%50%10%1%

What each source reports

CVE List Score used 5.9

XML External Entity (XXE) injection when documenting untrusted XML content

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.

Record
CVE-2026-40991
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L
Weakness
CWE-611
Updated
2026-11-02
EUVDEUVD-2026-35885 5.9

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.

Record
EUVD-2026-35885
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L
Updated
2026-11-02
GitHub AdvisoriesGHSA-6rpq-6vv2-5222 5.9

Spring 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.

Record
GHSA-6rpq-6vv2-5222
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L
Weakness
CWE-611
Updated
2026-11-02
NVD 5.9

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.

Record
CVE-2026-40991
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L
Weakness
CWE-611
Updated
2026-11-02
OSV 5.9

XML External Entity (XXE) injection when documenting untrusted XML content

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.

Record
CVE-2026-40991
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L
Weakness
CWE-611
Updated
2026-11-02
OSVGHSA-6rpq-6vv2-5222 5.9

Spring 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.

Record
GHSA-6rpq-6vv2-5222
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L
Weakness
CWE-611
Updated
2026-11-02
OSVCLSA-2026-1793192311 No score

TuxCare security update for org.springframework.restdocs (1 CVE)

TuxCare rebuilt 2 org.springframework.restdocs packages to address 1 CVE. Fixed in 2.0.5.RELEASE-tuxcare.1.

Record
CLSA-2026-1793192311
Updated
2026-11-02
OSVROOT-APP-MAVEN-CVE-2026-40991 No score

CVE-2026-40991 in io.root.org.springframework.restdocs:spring-restdocs-restassured - Patched by Root

Root has patched CVE-2026-40991 in the io.root.org.springframework.restdocs:spring-restdocs-restassured package for Root:Maven. Multiple fixed versions available.

Record
ROOT-APP-MAVEN-CVE-2026-40991
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
org.springframework.restdocs:spring-restdocs-webtestclient
Maven
4.0.0 to 4.0.0
4.0.1
org.springframework.restdocs:spring-restdocs-webtestclient
Maven
3.0.0 to 3.0.5
3.0.6
org.springframework.restdocs:spring-restdocs-webtestclient
Maven
through 2.0.8.RELEASE None known
org.springframework.restdocs:spring-restdocs-restassured
Maven
4.0.0 to 4.0.0
4.0.1
org.springframework.restdocs:spring-restdocs-restassured
Maven
3.0.0 to 3.0.5
3.0.6
org.springframework.restdocs:spring-restdocs-restassured
Maven
through 2.0.8.RELEASE None known
org.springframework.restdocs:spring-restdocs-restassured
TuxCare:Maven
2.0.5.RELEASE up to 2.0.5.RELEASE-tuxcare.1
2.0.5.RELEASE-tuxcare.1
org.springframework.restdocs:spring-restdocs-webtestclient
TuxCare:Maven
2.0.5.RELEASE up to 2.0.5.RELEASE-tuxcare.1
2.0.5.RELEASE-tuxcare.1
org.springframework.restdocs:spring-restdocs-webtestclient
Maven
4.0.0 up to 4.0.1
4.0.1
org.springframework.restdocs:spring-restdocs-webtestclient
Maven
3.0.0 up to 3.0.6, plus listed versions
3.0.13.0.23.0.33.0.43.0.5
3.0.6
Show 6 moreShow less
Affected packages
PackageAffectedFixed
org.springframework.restdocs:spring-restdocs-webtestclient
Maven
through 2.0.8.RELEASE, plus listed versions
2.0.0.RELEASE2.0.1.RELEASE2.0.2.RELEASE2.0.3.RELEASE2.0.4.RELEASE2.0.5.RELEASE2.0.6.RELEASE2.0.7.RELEASE
None known
org.springframework.restdocs:spring-restdocs-restassured
Maven
4.0.0 up to 4.0.1
4.0.1
org.springframework.restdocs:spring-restdocs-restassured
Maven
3.0.0 up to 3.0.6, plus listed versions
3.0.13.0.23.0.33.0.43.0.5
3.0.6
org.springframework.restdocs:spring-restdocs-restassured
Maven
through 2.0.8.RELEASE, plus listed versions
1.1.0.RELEASE1.1.1.RELEASE1.1.2.RELEASE1.1.3.RELEASE1.2.0.RELEASE
Show 14 moreShow less
1.2.1.RELEASE1.2.2.RELEASE1.2.3.RELEASE1.2.4.RELEASE1.2.5.RELEASE1.2.6.RELEASE2.0.0.RELEASE2.0.1.RELEASE2.0.2.RELEASE2.0.3.RELEASE2.0.4.RELEASE2.0.5.RELEASE2.0.6.RELEASE2.0.7.RELEASE
None known
io.root.org.springframework.restdocs:spring-restdocs-restassured
Root:Maven
before 2.0.8.RELEASE-root.io.1
2.0.8.RELEASE-root.io.13.0.3-root.io.1
org.springframework.restdocs:spring-restdocs-restassured
Root:Maven
before 2.0.8.RELEASE-aikido.1
2.0.8.RELEASE-aikido.13.0.3-aikido.1

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-40991 is a medium vulnerability (CVSS 5.9) in Broadcom Spring Rest Docs, published June 9, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.22%, the 12th percentile. Fixed in org.springframework.restdocs:spring-restdocs-webtestclient 4.0.1.

References

MoveEnter Open