Spring Data REST allows mutation of the version property of immutable aggregates via PUT

MEDIUM | AUGUST 20, 2026 | CVE-2026-47850

Description

Spring Data REST does not preserve the persisted version (@Version) property of an aggregate root when handling an HTTP PUT against an immutable target type.

For mutable aggregates, the PUT merge logic explicitly retains the stored identifier and version properties, discarding any client-supplied values. For immutable aggregates — Java records, Kotlin data classes, all-args @PersistenceCreator types — or when a polymorphic (@JsonTypeInfo) subtype change occurs, the merge instead returns the request-body object and restores only Jackson @JsonIgnore-marked properties from storage. The version property is not among those, and while the identifier is re-applied from the persisted entity by the request-handling layer, the version is not.

As a result, an authenticated client with PUT access can submit a version value in the request body that is honoured and persisted. This defeats optimistic-locking (lost-update) protection for applications that rely on @Version rather than mandatory If-Match/ETag preconditions, allowing a stale write to be silently accepted and a concurrent update to be overwritten.

Affected applications are those that expose a Spring Data REST repository whose aggregate root is an immutable type (or permits a body-driven polymorphic subtype change) and that declares a version property visible to Jackson's deserialization model and not excluded via @JsonIgnore.

Affected Spring Products and Versions

Spring Data REST:

  • 5.1.0 - 5.1.0
  • 5.0.0 - 5.0.6
  • 4.5.0 - 4.5.12
  • 4.0.0 - 4.4.15
  • 3.7.20 and earlier

Mitigation

Users of affected versions should upgrade to the corresponding fixed version.
Fix versionAvailability
5.1.1OSS
5.1.0.1Enterprise Support Only
5.0.7OSS
5.0.6.1Enterprise Support Only
4.5.13Enterprise Support Only
4.4.16Enterprise Support Only
3.7.21Enterprise Support Only

No further mitigation steps are necessary.

History

  • 2026-08-20: Initial vulnerability report published.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all