Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreSpring Data REST is vulnerable to SpEL expression injection through map-typed properties when processing JSON Patch (application/json-patch+json) requests.
When a persistent entity exposes a Map-typed property, the JSON Pointer path segment used as the map key is embedded directly into a SpEL expression without sanitization or validation. An attacker who can issue PATCH requests against an affected endpoint can craft a map-key segment that breaks out of the intended indexer literal and evaluates an arbitrary SpEL sub-expression within the context of the aggregate root.
Both the read and write patch paths are affected.
Preconditions:
Map-typed persistent property.PATCH requests with Content-Type: application/json-patch+json to the item resource (enabled by default; authentication requirements depend on the application's security configuration).Spring Data REST:
Versions that are no longer supported are also affected.
Users of affected versions should upgrade to the corresponding fixed version.
| Affected version(s) | Fix version | Availability |
|---|---|---|
| 3.7.x | 3.7.20 | Commercial |
| 4.3.x | 4.3.17 | Commercial |
| 4.4.x | 4.4.15 | Commercial |
| 4.5.x | 4.5.12 | OSS |
| 5.0.x | 5.0.6 | OSS |
The issue was identified and responsibly reported by Daehyun Kang (@daehyuh) [email protected].
To report a security vulnerability for a project within the Spring portfolio, see the Security Policy