CVE-2021-22047: Exposure of Resource to Wrong Sphere in Spring Data REST
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.54065%
CWE
Published
5/24/2022
Updated
1/27/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| org.springframework.data:spring-data-rest-core | maven | >= 3.4.0, <= 3.4.13 | 3.4.14 |
| org.springframework.data:spring-data-rest-core | maven | >= 3.5.0, <= 3.5.5 | 3.5.6 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from Spring Data REST controllers being registered in both base path and root namespaces when using class-level @RequestMapping. The patches add validation in handler mapping components to prevent this dual registration. The vulnerable functions are the pre-patch isHandler() implementations that failed to check for conflicting @RequestMapping annotations, allowing unauthorized endpoint exposure. These methods would appear in stack traces when processing requests to the unintended duplicate endpoints.