SQL injection vulnerability in Pivotal Spring Data JPA before 1.9.6 (Gosling SR6) and 1.10.x before 1.10.4 (Hopper SR4), when used with a repository that defines a String query using the @Query annotation, allows attackers to execute arbitrary JPQL commands via a sort instance with a function call.
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
Link | Tags |
---|---|
http://www.securityfocus.com/bid/93276 | vdb entry |
https://jira.spring.io/browse/DATAJPA-965 | mitigation vendor advisory |
https://pivotal.io/security/cve-2016-6652 | vendor advisory |
https://security.gentoo.org/glsa/201701-01 | vendor advisory |
https://github.com/spring-projects/spring-data-jpa/commit/b8e7fe | patch |