CVE-2022-31679: Spring Data REST can expose hidden entity attributes
3.7
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.51127%
CWE
-
Published
9/22/2022
Updated
1/31/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/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.6.0, < 3.6.7 | 3.6.7 |
| org.springframework.data:spring-data-rest-core | maven | >= 3.7.0, < 3.7.3 | 3.7.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from insufficient property visibility checks during JSON Patch processing. The commit introduces BindContext to validate readable/writable properties using Jackson's metadata. Key vulnerable functions include: 1) JsonPatchHandler.applyPatch (lacked context-aware validation), 2) SpelPath.bindTo (path resolution without visibility checks), and 3) MappedProperties.isWritableProperty (incomplete Jackson annotation handling). The patch adds BindContextFactory and JacksonBindContext to properly respect @JsonIgnore and @JsonIgnoreProperties, indicating these were missing in vulnerable versions.