CWE-564: SQL Injection: Hibernate

Export to Word

Description

Using Hibernate to execute a dynamic SQL statement built with user-controlled input can allow an attacker to modify the statement's meaning or to execute arbitrary SQL commands.

Extended Description

N/A


ThreatScore

Threat Mapped score: 0.0

Industry: Finiancial

Threat priority: Unclassified


Observed Examples (CVEs)

Related Attack Patterns (CAPEC)


Attack TTPs

N/A

Modes of Introduction

Phase Note
Architecture and Design N/A
Implementation N/A

Common Consequences

Potential Mitigations

Applicable Platforms


Demonstrative Examples

Intro: The following code excerpt uses Hibernate's HQL syntax to build a dynamic query that's vulnerable to SQL injection.

String street = getStreetFromUser(); Query query = session.createQuery("from Address a where a.street='" + street + "'");

Notes

← Back to CWE list