CVE-2019-3797: SQL Injection in Spring Data JPA
Summary
CVE-2019-3797: Exposure of Sensitive Information to an Unauthorized Actor and SQL Injection in Spring Data JPA. Affects org.springframework.data:spring-data-jpa across 3 version ranges.
< 1.11.20
>= 2.0.0, < 2.0.14
>= 2.1.0, < 2.1.6
Fixed in 1.11.20, 2.0.14 or 2.1.6, depending on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Spring Data JPA is a library that provides an abstraction layer on top of JPA (Java Persistence API) to simplify database access in Java applications. It allows developers to write queries using a higher-level, object-oriented approach. However, versions up to and including 2.1.5, 2.0.13, and 1.11.19 of Spring Data JPA are vulnerable to SQL injection and exposure of sensitive information.
Vulnerability Detail
The vulnerability arises from the usage of derived queries with predicates such as 'startingWith', 'endingWith', or 'containing'. When a maliciously crafted query parameter value is supplied, these queries may return more results than expected. Additionally, manually defined queries using LIKE expressions may also produce unexpected results if the parameter values are not properly escaped. This can lead to the exposure of sensitive information and potential SQL injection attacks.
How To Fix
Latest published version: 4.2.0-RC1 as of 23 Oct 2026
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 1.11.201.11.20 -
>= 2.0.0, < 2.0.142.0.14 -
>= 2.1.0, < 2.1.62.1.6
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no specific workaround provided for this vulnerability. It is recommended to apply the fix by upgrading to the fixed versions of Spring Data JPA.
Conclusion
In conclusion, the vulnerability in Spring Data JPA versions up to and including 2.1.5, 2.0.13, and 1.11.19 can result in the exposure of sensitive information and potential SQL injection attacks. It is crucial to upgrade to the fixed versions (1.11.20, 2.0.14, or 2.1.6) to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.springframework.data:spring-data-jpa →
FAQ
Spring Data JPA is a library that provides an abstraction layer on top of JPA (Java Persistence API) to simplify database access in Java applications.
Versions up to and including 2.1.5, 2.0.13, and 1.11.19 of Spring Data JPA are affected by this vulnerability.
This vulnerability can lead to the exposure of sensitive information and potential SQL injection attacks.
To fix this vulnerability, it is recommended to upgrade to the fixed versions of Spring Data JPA (1.11.20, 2.0.14, or 2.1.6).
No specific workaround is provided. It is recommended to apply the fix by upgrading to the fixed versions.
References
Related vulnerabilities
Recent vulnerabilities recorded for org.springframework.data:spring-data-jpa.