# CVE-2019-14900: SQL Injection in Hibernate ORM

> SQL injection in Hibernate ORM's JPA Criteria API allows attackers to access unauthorized data or execute further attacks.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Jul 2020
- **Updated:** 5 Aug 2024
- **Also known as:** CLSA-2026-1767917315, CLSA-2026-1783645403, GHSA-8grg-q944-cch5, OESA-2021-1135, OESA-2021-1136, OESA-2021-1137, SUSE-SU-2020:2832-1

## What is CVE-2019-14900?

CVE-2019-14900 is a medium-severity SQL injection vulnerability in Redhat Jboss Enterprise Application Platform, published on 6 Jul 2020. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A flaw was found in Hibernate ORM in versions before 5.3.18, 5.4.18 and 5.5.0.Beta1. A SQL injection in the implementation of the JPA Criteria API can permit unsanitized literals when a literal is used in the SELECT or GROUP BY parts of the query. This flaw could allow an attacker to access unauthorized information or possibly conduct further attacks.

Weakness: CWE-89 (Improper Neutralization of Special Elements used in an SQL Command)

## Which versions are affected by CVE-2019-14900?

6 open source packages ship an affected version, including org.hibernate:hibernate-core. It affects 10 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.hibernate:hibernate-core` | Maven | All versions | 5.3.18 |
| `org.hibernate:hibernate-core` | Maven | All versions | 5.3.18 |
| `org.hibernate:hibernate-core` | Maven | From 5.4.0 | 5.4.18 |
| `org.hibernate:hibernate-core` | Maven | From 5.4.0 | 5.4.18 |
| `org.hibernate:hibernate-core` | Maven | From 5.5.0.Alpha1 | 5.5.0.Beta1 |
| `org.hibernate:hibernate-core` | Maven | From 5.5.0.Alpha1 | 5.5.0.Beta1 |
| `golang-github-QubitProducts-exporter_exporter` | SUSE:Manager Server Module 4.1 | All versions | 0.4.0-6.9.4 |
| `golang-github-prometheus-node_exporter` | SUSE:Manager Server Module 4.1 | All versions | 1.0.1-3.3.4 |
| `hibernate5` | SUSE:Manager Server Module 4.1 | All versions | 5.3.7-3.3.4 |
| `hub-xmlrpc-api` | SUSE:Manager Server Module 4.1 | All versions | 0.7-3.3.3 |
| `patterns-suse-manager` | SUSE:Manager Server Module 4.1 | All versions | 4.1-6.6.3 |
| `prometheus-exporters-formula` | SUSE:Manager Server Module 4.1 | All versions | 0.7.3-3.10.1 |
| `salt-netapi-client` | SUSE:Manager Server Module 4.1 | All versions | 0.17.0-15.4.3 |
| `spacecmd` | SUSE:Manager Server Module 4.1 | All versions | 4.1.7-4.6.3 |
| `spacewalk-backend` | SUSE:Manager Server Module 4.1 | All versions | 4.1.15-4.8.4 |
| `spacewalk-branding` | SUSE:Manager Server Module 4.1 | All versions | 4.1.10-3.6.3 |
| `spacewalk-certs-tools` | SUSE:Manager Server Module 4.1 | All versions | 4.1.13-3.6.3 |
| `spacewalk-client-tools` | SUSE:Manager Server Module 4.1 | All versions | 4.1.6-4.3.3 |
| `spacewalk-java` | SUSE:Manager Server Module 4.1 | All versions | 4.1.20-3.11.8 |
| `spacewalk-utils` | SUSE:Manager Server Module 4.1 | All versions | 4.1.12-3.6.3 |
| `spacewalk-web` | SUSE:Manager Server Module 4.1 | All versions | 4.1.18-3.6.3 |
| `subscription-matcher` | SUSE:Manager Server Module 4.1 | All versions | 0.26-3.3.3 |
| `susemanager` | SUSE:Manager Server Module 4.1 | All versions | 4.1.20-3.8.3 |
| `susemanager-build-keys` | SUSE:Manager Server Module 4.1 | All versions | 15.2.1-3.3.2 |
| `susemanager-doc-indexes` | SUSE:Manager Server Module 4.1 | All versions | 4.1-11.12.2 |
| `susemanager-docs_en` | SUSE:Manager Server Module 4.1 | All versions | 4.1-11.12.2 |
| `susemanager-schema` | SUSE:Manager Server Module 4.1 | All versions | 4.1.13-3.6.3 |
| `susemanager-sls` | SUSE:Manager Server Module 4.1 | All versions | 4.1.15-3.8.4 |
| `uyuni-config-formula` | SUSE:Manager Server Module 4.1 | All versions | 0.1-6.3.3 |

Products: Hibernate Hibernate Orm, Quarkus Quarkus, Redhat Build of Quarkus, Redhat Decision Manager, Redhat Fuse, Redhat Jboss Data Grid, Redhat Jboss Enterprise Application Platform, Redhat Jboss Middleware Text-Only Advisories, Redhat Openstack, Redhat Single Sign-On.

## How do I fix CVE-2019-14900?

Upgrade org.hibernate:hibernate-core to a fixed version for your release line: 5.3.18, 5.4.18 or 5.5.0.Beta1.

## Is CVE-2019-14900 being exploited?

There is no known exploitation of CVE-2019-14900 in the wild and no public exploit code.

Public exploit code:

- CVE-2019-14900 (github_poc): https://github.com/shanika04/hibernate-orm

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-14900 and fix it if it is affected.

What it is: CVE-2019-14900 is a medium-severity SQL injection vulnerability in Redhat Jboss Enterprise Application Platform, published on 6 Jul 2020. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2019-14900 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.hibernate:hibernate-core (Maven): affected all versions; fixed in 5.3.18
- org.hibernate:hibernate-core (Maven): affected all versions; fixed in 5.3.18
- org.hibernate:hibernate-core (Maven): affected from 5.4.0; fixed in 5.4.18
- org.hibernate:hibernate-core (Maven): affected from 5.4.0; fixed in 5.4.18
- org.hibernate:hibernate-core (Maven): affected from 5.5.0.Alpha1; fixed in 5.5.0.Beta1
- org.hibernate:hibernate-core (Maven): affected from 5.5.0.Alpha1; fixed in 5.5.0.Beta1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-14900/ (Markdown: https://insights.sbomify.com/CVE-2019-14900/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-14900
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-14900
- OSV: https://osv.dev/vulnerability/CVE-2019-14900

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-14900/
Summaries are generated and may contain mistakes; the official description above is the record.
