CVE-2026-59376 in Spring HATEOAS
Summary
by MITRE • 12/02/2026
Spring HATEOAS does not honour Jackson's @JsonProperty(access = Access.READ_ONLY) declaration when deserializing Collection+JSON ( application/vnd.collection+json ) and UBER ( application/vnd.uber+json ) request bodies.
Both media types reconstruct the domain object from the name/value pairs of the incoming representation using an internal, reflection-based property binder rather than Jackson's own bean deserializer. That binder resolves each property's setter from the JavaBeans property descriptor and invokes it directly, applying only Jackson's @JsonIgnore and @JsonIgnoreProperties exclusions. Properties declared read-only are not excluded, so a client-supplied value for such a property is accepted and written to the object.
As a result, a client able to submit a Collection+JSON or UBER request body can populate properties that the application declared as server-owned and expected to be ignored on input, such as a role, permission or account-state property. The same payload submitted as application/json is handled by Jackson's bean deserializer, which correctly ignores those properties, so the exposure is specific to the two affected media types.
Affected applications are those that enable Collection+JSON or UBER hypermedia support and bind request bodies directly onto a domain type declaring a @JsonProperty(access = Access.READ_ONLY) property with a setter. Applications using only the HAL or HAL-FORMS media types are not affected, as those do not use the affected binder on the deserialization path. Applications that bind requests onto dedicated input DTOs without read-only properties are also not affected.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 12/02/2026
The vulnerability in Spring HATEOAS represents a significant deviation from expected serialization and deserialization behaviors when handling specific hypermedia formats, specifically Collection+JSON and UBER media types. This issue stems from the internal architecture of how these media types reconstruct domain objects from incoming request bodies. Unlike standard JSON processing which relies on Jackson's robust bean deserializer, Spring HATEOAS employs a custom reflection-based property binder for these particular content types. This bespoke binder operates by iterating through name-value pairs in the payload and directly invoking JavaBeans setters to populate object properties. While this approach allows for flexibility in hypermedia-driven applications, it fails to respect critical Jackson annotations that dictate access control at the field level, most notably @JsonProperty with Access.READ_ONLY. Consequently, developers who explicitly mark certain fields as read-only, intending them to be immutable from client input and managed solely by server-side logic, find their security assumptions violated because the binder ignores these constraints during deserialization of Collection+JSON or UBER payloads.
The technical flaw lies in the limited scope of exclusions applied by this internal property binder. The binder correctly processes JsonIgnore and JsonIgnoreProperties annotations, effectively filtering out fields marked for complete exclusion from serialization or deserialization entirely. However, it does not evaluate Access.READ_ONLY, which is designed to permit reading but forbid writing via setters during input binding. This discrepancy creates a selective bypass of security controls where the application logic expects certain properties such as user roles, permission levels, account states, or administrative flags to remain untouched by external inputs. When an attacker submits a malicious payload in one of these affected media types, they can inject values into these protected fields. The binder resolves the setter method associated with each property from the JavaBeans descriptor and executes it directly, thereby overwriting server-controlled state with client-supplied data. This behavior is inconsistent with standard JSON processing where Jackson's bean deserializer would correctly enforce read-only constraints, highlighting that this vulnerability is media-type specific rather than a universal flaw in Spring HATEOAS or Jackson itself.
The operational impact of this vulnerability allows for potential privilege escalation and unauthorized state manipulation within affected applications. An attacker who can submit requests using application/vnd.collection+json or application/vnd.uber+json content types can modify attributes that should be immutable, such as changing their own role from a standard user to an administrator or altering account status flags. This undermines the integrity of the application's business logic and security model, which relies on these fields being server-managed only. The risk is particularly acute in applications where hypermedia controls are enabled for these specific formats and domain objects with read-only properties are bound directly from request bodies without intermediate Data Transfer Objects that filter out such inputs. Applications utilizing HAL or HAL-FORMS media types remain unaffected because they do not utilize the vulnerable property binder on their deserialization path, nor are those applications affected if they employ dedicated input DTOs that exclude sensitive fields before binding to domain entities.
This vulnerability aligns with CWE-20 Improper Input Validation and CWE-915 Improper Modification of Object Attributes, as it involves a failure to validate or restrict modifications to object properties based on defined access controls. In the context of the MITRE ATT&CK framework, this behavior facilitates Privilege Escalation via Tactic TA0004 by allowing an attacker to modify account permissions and Impair Defenses through unauthorized changes to system state such as account status. To mitigate this issue, developers should avoid binding request bodies directly onto domain objects that contain read-only properties when using the affected media types. Instead, applications should utilize dedicated input DTOs for deserialization purposes, ensuring that sensitive fields are excluded from these transfer objects before any mapping occurs. Alternatively, upgrading to a patched version of Spring HATEOAS where this binder has been updated to respect Jackson's Access.READ_ONLY annotation is essential. Until such patches are applied or architectural changes are implemented, restricting the acceptance of Collection+JSON and UBER media types in public-facing endpoints can reduce the attack surface for exploitation attempts targeting these specific deserialization paths.