CVE-2021-22047 Exposure of Resource to Wrong Sphere in Spring Data REST
Custom controllers may expose resources under unintended URIs, potentially allowing unauthorized data access if Spring Security is not configured to block them.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-22047?
CVE-2021-22047 is a medium-severity missing authorization vulnerability in Spring Data REST, published on 28 Oct 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
In Spring Data REST versions 3.4.0 - 3.4.13, 3.5.0 - 3.5.5, and older unsupported versions, HTTP resources implemented by custom controllers using a configured base API path and a controller type-level request mapping are additionally exposed under URIs that can potentially be exposed for unauthorized access depending on the Spring Security configuration.
Which versions are affected by CVE-2021-22047?
4 open source packages ship an affected version, including org.springframework.data:spring-data-rest-core. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.springframework.data:spring-data-rest-core Maven | From 3.4.0 | 3.4.14 |
org.springframework.data:spring-data-rest-core Maven | From 3.4.0 | 3.4.14 |
org.springframework.data:spring-data-rest-core Maven | From 3.5.0 | 3.5.6 |
org.springframework.data:spring-data-rest-core Maven | From 3.5.0 | 3.5.6 |
Products include Vmware Spring Data Rest.
How do I fix CVE-2021-22047?
Upgrade org.springframework.data:spring-data-rest-core to a fixed version for your release line: 3.4.14 or 3.5.6.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2021-22047 being exploited?
There is no known exploitation of CVE-2021-22047 in the wild and no public exploit code.
Other vulnerabilities in Spring Data REST
- CVE-2026-41729 Spring Data REST SpEL Injection via Map Key in JSON Patch
- CVE-2026-41728 Spring Data REST JSON Patch bypasses Jackson read-only property protection on nested objects and collections
- CVE-2026-47849 Spring Data REST allows mutation of identifier and version properties via JSON Patch
- CVE-2026-41730 Spring Data REST exposes persistence-layer internals in error responses
- CVE-2026-41837 Spring Data REST Querydsl integration exposes Jackson-hidden persistent fields as filter keys
Sources
Also known as GHSA-4926-qpxg-6r3w.