Spring Data JPA Sort expression validation bypass

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

Description

Spring Data JPA's Sort validation can be bypassed when parameters containing crafted payload are accepted from untrusted sources.

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

  • The application accepts Sort parameters from untrusted input and uses them without prior sanitization as input for native SQL repository methods.
  • The repository method is annotated with @NativeQuery or @Query(nativeQuery=true).
  • The repository method allows sorting via a Sort or Pageable parameter.
  • The underlying database accepts non ASCII characters as part of its SQL syntax.

On affected databases inference of data characteristics through deterministic sorting is possible.

Affected Spring Products and Versions

Spring Data JPA:

  • 4.1.0 - 4.1.0
  • 4.0.0 - 4.0.6
  • 3.5.0 - 3.5.13
  • 3.0.0 - 3.4.15

Mitigation

Users of affected versions should upgrade to the corresponding fixed version.
Fix versionAvailability
4.1.1OSS
4.0.7OSS
3.5.14Enterprise Support Only
3.4.16Enterprise Support Only

No further mitigation steps are necessary.

Credit

The issue was identified and responsibly reported by SharlongWen.

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