CVE-2026-40991

CVE-2026-40991 is a medium-severity vulnerability with a CVSS 3.x base score of 5.9. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-611.

Key facts

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.

Frequently asked questions

What is CVE-2026-40991?
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.
How severe is CVE-2026-40991?
CVE-2026-40991 has a CVSS 3.x base score of 5.9, rated medium severity. It is exploitable over network with high attack complexity, requires no privileges and user interaction. Impact on confidentiality is high, integrity none, and availability low.
Is CVE-2026-40991 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (13th percentile), an estimate of the probability of exploitation in the next 30 days.
How do I fix CVE-2026-40991?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
Does CVE-2026-40991 have an EU (EUVD) identifier?
Yes. CVE-2026-40991 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2026-35885.
When was CVE-2026-40991 published?
CVE-2026-40991 was published on 2026-06-10 and last updated on 2026-06-27.

References

Other CWE-611 (Improper Restriction of XML External Entity Reference (XXE)) vulnerabilities

Browse all CWE-611 (Improper Restriction of XML External Entity Reference (XXE)) vulnerabilities →