Spring Data REST allows POST requests on association resources although save(…) is not exported

MEDIUM | NOVEMBER 19, 2026 | CVE-2026-59377

Description

Spring Data REST can be configured to make an aggregate read-only by excluding the repository's save(…) method from export, for example via @RestResource(exported = false). In that case, the PUT, PATCH and DELETE methods on the aggregate's association resources are correctly withheld.

However, the POST method on collection-like association resources is not subject to the same check.

An attacker can send a POST request with a text/uri-list body to such an association resource, for example /orders/42/items. Spring Data REST adds the referenced resources to the association and invokes the repository's save(…) method for the parent aggregate. This persists the new association links despite the read-only configuration.

The application is vulnerable if all of the following are true:

  • A repository that is exported over REST excludes its save(…) method from export, either explicitly or by disabling the export of repository methods by default without re-exporting save(…).
  • The domain type declares a writable, collection-like association whose target type is exported through a repository as well.
  • The attacker can reach the Spring Data REST endpoints. Whether that requires authentication depends on the application.

On affected applications the integrity of aggregates intended to be read-only can be compromised.

Affected Spring Products and Versions

Spring Data REST:

  • 5.1.0 - 5.1.2
  • 5.0.0 - 5.0.8
  • 4.5.0 - 4.5.14
  • 4.0.0 - 4.4.16
  • 3.7.21 and earlier

Mitigation

Users of affected versions should upgrade to the corresponding fixed version.
Fix versionAvailability
5.1.3OSS
5.1.2.1Enterprise Support Only
5.0.9OSS
5.0.8.1Enterprise Support Only
4.5.15Enterprise Support Only
4.4.17Enterprise Support Only
3.7.22Enterprise Support Only

Users who cannot upgrade immediately can apply one of the following:

  • Restrict POST requests on association resources to trusted principals at the web security layer.
  • Exclude the affected association from export by annotating the property with @RestResource(exported = false).

History

  • 2026-11-19: Initial vulnerability report published.

Get ahead

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

Learn more

Get support

TrueSource Spring Enterprise 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