Spring REST Docs REST Assured & WebFlux are vulnerable to Improper Restriction of XML External Entity Reference
CVE-2026-40991GHSA-6rpq-6vv2-5222
What to do
Partial vendor fix. Follow the primary source's mitigation guidance and check back for a fix.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
Maven org.springframework.restdocs:spring-restdocs-restassured
- Affected
- >= 4.0.0, <= 4.0.0>= 3.0.0, <= 3.0.5<= 2.0.8.RELEASE
- Fixed in
- 3.0.6, 4.0.1
Maven org.springframework.restdocs:spring-restdocs-webtestclient
- Affected
- >= 4.0.0, <= 4.0.0>= 3.0.0, <= 3.0.5<= 2.0.8.RELEASE
- Fixed in
- 3.0.6, 4.0.1
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-6rpq-6vv2-5222 lists affected ranges: Maven org.springframework.restdocs:spring-restdocs-webtestclient >=4.0.0 =3.0.0 =0 =4.0.0 =3.0.0 =0 <=2.0.8.RELEASE
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 5.9 · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L
- EPSS
- CVE-2026-40991: 0.22% estimated exploitation activity in the next 30 days; percentile 12.94 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
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.
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 1 · created ·
Published from ghsa record GHSA-6rpq-6vv2-5222
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2026-40991 Advisory: Spring REST Docs REST Assured & WebFlux are vulnerable to Improper Restriction of XML External Entity Reference IDs: CVE-2026-40991, GHSA-6rpq-6vv2-5222 Record: https://patchnext.com/advisories/cve-2026-40991 (revision 1, source checked 26 Oct 2026, 16:54 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Medium (CVSS 5.9) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Partial vendor fix; fixed versions by package: org.springframework.restdocs:spring-restdocs-restassured 4.0.1, 3.0.6; org.springframework.restdocs:spring-restdocs-webtestclient 4.0.1, 3.0.6. A vendor fix does not mean a deployment is fixed. ## Affected components - Maven org.springframework.restdocs:spring-restdocs-restassured: affected >= 4.0.0, <= 4.0.0; >= 3.0.0, <= 3.0.5; <= 2.0.8.RELEASE; fixed in 3.0.6, 4.0.1 - Maven org.springframework.restdocs:spring-restdocs-webtestclient: affected >= 4.0.0, <= 4.0.0; >= 3.0.0, <= 3.0.5; <= 2.0.8.RELEASE; fixed in 3.0.6, 4.0.1 ## Suggested inspection (read-only) - Maven org.springframework.restdocs:spring-restdocs-restassured: check the installed version with your package manager. - Maven org.springframework.restdocs:spring-restdocs-webtestclient: check the installed version with your package manager. ## Supported action No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on org.springframework.restdocs:spring-restdocs-restassured, org.springframework.restdocs:spring-restdocs-webtestclient. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-6rpq-6vv2-5222 (GitHub-reviewed advisory GHSA-6rpq-6vv2-5222 lists affected ranges: Maven org.springframework.restdocs:spring-restdocs-webtestclient >=4.0.0 =3.0.0 =0 =4.0.0 =3.0.0 =0 <=2.0.8.RELEASE) Commands are suggestions: review each one before running it.
Loading voting…