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:
| Fix version | Availability |
|---|---|
| 5.0.6 | OSS |
| 5.0.5.1 | Enterprise Support Only |
| 4.5.12 | OSS |
| 4.5.11.1 | Enterprise Support Only |
| 4.4.15 | Enterprise Support Only |
| 4.3.17 | Enterprise Support Only |
| 3.7.20 | Enterprise Support Only |
No further mitigation steps are necessary.
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