CVE-2026-59377
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring Data REST is part of the umbrella Spring Data project and makes it easy to build hypermedia-driven REST web services on top of Spring Data repositories.
An authorization bypass vulnerability (CVE-2026-59377) has been identified in Spring Data REST, which allows attackers to add links to collection-like associations of aggregates that are configured as read-only. A POST request to an association resource persists the new links through the repository's save(…) method, even when that method is excluded from export.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.
This issue affects multiple versions of Spring Data REST.
Details
Module Info
- Product: Spring Data REST
- Affected packages:
org.springframework.data:spring-data-rest-core - Affected versions: <=3.7.21, >=4.0.0 <=4.4.16, >=4.5.0 <=4.5.14, >=5.0.0 <=5.0.8, >=5.1.0 <=5.1.2
- GitHub repository: https://github.com/spring-projects/spring-data-rest
- Published packages: https://central.sonatype.com/artifact/org.springframework.data/spring-data-rest-core
- Package manager: Maven
- Fixed in:
- OSS Spring Data REST 5.0.9, 5.1.3
- NES for Spring Data REST
Vulnerability Info
This Medium-severity vulnerability is found in the org.springframework.data:spring-data-rest-core package in multiple versions of Spring Data REST.
Spring Data REST lets an application make an aggregate read-only by excluding the repository's save(…) method from export, for example with @RestResource(exported = false). The HTTP methods exposed for an aggregate's association resources are computed by CrudMethodsSupportedHttpMethods.getMethodsFor(PersistentProperty):
Set<HttpMethod> methods = new HashSet<HttpMethod>();
methods.add(GET);
if (property.isWritable() && getMethodsFor(ITEM).contains(PUT)) {
methods.add(PUT);
methods.add(PATCH);
methods.add(DELETE);
}
if (property.isCollectionLike() && property.isWritable()) {
methods.add(POST);
}
return HttpMethods.of(methods);
PUT, PATCH and DELETE are only added when the item resource supports PUT, which is the case only when save(…) is exported. POST is added for every writable, collection-like association without that check. An attacker who can reach the Spring Data REST endpoints can therefore 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 calls the repository's save(…) method for the parent aggregate, persisting the new links despite the read-only configuration.
An application is vulnerable when an exported repository excludes save(…) from export (explicitly, or by disabling the default export of repository methods without re-exporting save(…)), its domain type declares a writable, collection-like association whose target type is also exported through a repository, and the attacker can reach the endpoints. Whether that requires authentication depends on the application. The integrity of aggregates intended to be read-only can be compromised.
Mitigation
Only recent versions of Spring Data REST receive community support. Older lines are End-of-Life and will not receive public updates to address this issue.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a currently supported version of Spring Data REST.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.