5.9

CVE-2026-40991: XML External Entity (XXE) injection when documenting untrusted XML content

Analyzed
AliasesGHSA-6rpq-6vv2-5222
Published 09-06-2026Last modified 27-06-2026

Vulnerability summary

CVE-2026-40991 is a medium (CVSS 5.9) vulnerability in broadcom spring_rest_docs. EPSS estimates a 0.22% chance of exploitation in the next 30 days, higher than 13.7% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 5.9, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
5.9/10
010
Medium · v3.1 (CVE.org)
EPSS score
0.22%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Timeline

  1. 09-06-2026
    PublishedVulnerability first disclosed.
  2. 27-06-2026
    Last modifiedVulnerability information updated.

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 metrics

3 scores · 3 sources · 1 version

EPSS trend

Probability

0.22%

Chance of exploitation in the next 30 days

Percentile

14%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.22% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.

Org.springframework.restdocs2 products
  • spring-restdocs-restassured≥ 4.0.0, < 4.0.1 | ≥ 3.0.0, < 3.0.6 | ≤ 2.0.8.RELEASE
  • spring-restdocs-webtestclient≥ 4.0.0, < 4.0.1 | ≥ 3.0.0, < 3.0.6 | ≤ 2.0.8.RELEASE
Broadcom1 product
Spring1 product
  • spring rest docs≥ 4.0.0, < 4.0.0.1 | ≥ 3.0.0, < 3.0.5.1 | ≥ 2.0.0.RELEASE, < 2.0.9.RELEASE

3 vendors · 4 products

References

5 links