CWE-564: Use of Hibernate with HQL/SQL Query String Containing External Input
Also known as: HQL Injection
The product uses Hibernate to execute a dynamic HQL or SQL statement, but the statement is built with user-controlled input.
Last updated
Also known as: HQL Injection
The product uses Hibernate to execute a dynamic HQL or SQL statement, but the statement is built with user-controlled input.
Last updated
14 recorded CVEs are caused by CWE-564 (Use of Hibernate with HQL/SQL Query String Containing External Input). The highest-severity and most recent are shown first. 11 new CWE-564 CVEs have been recorded so far in 2026 (3 in 2025).
Eventer - WordPress Event & Booking Manager Plugin <= 3.9.9.2 - Authenticated (Subscriber+) SQL Injection via reg_id
Landray OA Unauthenticated HQL Injection via wechatLoginHelper.do
Apache StreamPark: SQL injection vulnerability
erupts erupt EruptJpaUtils.java geneEruptHqlOrderBy sql injection
CoreShop Vulnerable to SQL Injection via Admin customer-company-modifier
Erupt through 2.3.0 HQL Injection via linkTreeVal in Data Table API
erupts erupt MCP Tool EruptDataQuery.java EruptDataQuery sql injection
SQL Injection: Hibernate in Schneider Electric NetBotz 5 750/755
Cisco Identity Services Engine Certificate Management SQL Injection Vulnerability
Cisco Identity Services Engine SQL Injection Vulnerability
CoreShop Vulnerable to SQL Injection via Admin Reports
Showing 12 of 14 recorded CWE-564 CVEs. Get an alert for each new one, with AI-written analysis and fixes.
Monitor these CVEsWhat can happen when CWE-564 is exploited.
Read Application Data, Modify Application Data
Affects: Confidentiality, Integrity
If an attacker can insert input directly into the SQL query string, even when the string contains parameter bindings, an attacker can modify the statement's structure and meaning, possibly execute arbitrary SQL commands (i.e., SQL injection).
Typically introduced during these phases of the software lifecycle.
Languages
Technologies
Practical mitigations for CWE-564, grouped by where in the lifecycle they apply.
A non-SQL style database that is not subject to this flaw may be chosen.
Follow the principle of least privilege when creating user accounts to a SQL database. Users should only have the minimum privileges necessary to use their account. If the requirements of the system indicate that a user can read and modify their own data, then limit their privileges so they cannot read/write others' data.
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Implement SQL strings using prepared statements that bind variables. Prepared statements that do not bind variables can be vulnerable to attack.
Use vigorous allowlist style checking on any user input that may be used in a SQL command. Rather than escape meta-characters, it is safest to disallow them entirely. Reason: Later use of data that have been entered in the database may neglect to escape meta-characters before use. Narrowly define the set of safe characters based on the expected value of the parameter in the request.
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Effectiveness: High
MITRE examples of the weakness in code.
The following code excerpt uses Hibernate's HQL syntax to build a dynamic query that is vulnerable to SQL injection.
Vulnerable example
String street = getStreetFromUser();
Query query = session.createQuery("from Address a where a.street='" + street + "'");Real CVEs that MITRE cites as examples of this weakness.
CAPEC attack patterns that exploit this weakness.
Common questions about CWE-564.
Weakness data is sourced from the MITRE CWE catalog (v4.21). CVE associations are aggregated and kept current by RadicalNotion.AI.
Get an alert when a new CWE-564 CVE affects your products, with AI-written analysis and remediation steps.