A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2020-25638

CVE-2020-25638: Hibernate ORM SQL Injection Vulnerability

CVE-2020-25638 is a SQL injection flaw in Hibernate ORM that allows attackers to inject unsanitized literals through JPA Criteria API comments. This article covers technical details, affected versions, and mitigation strategies.

Updated: May 16, 2026

CVE-2020-25638 Overview

CVE-2020-25638 is a SQL injection vulnerability in Hibernate ORM versions up to and including 5.4.23.Final. The flaw resides in the Java Persistence API (JPA) Criteria API implementation, where literals embedded in SQL comments are not properly sanitized. Attackers can inject unsanitized SQL fragments through these literals when applications enable comment generation on queries. Successful exploitation allows access to unauthorized data and may enable further attacks against the underlying database. The vulnerability affects multiple downstream products including Quarkus, Debian Linux, and several Oracle enterprise applications that ship Hibernate as a dependency.

Critical Impact

Network-based SQL injection in a widely deployed Java ORM library, threatening data confidentiality and integrity across enterprise applications.

Affected Products

  • Hibernate ORM versions up to and including 5.4.23.Final
  • Debian Linux 9.0 and 10.0
  • Quarkus framework
  • Oracle Communications Cloud Native Core Console 1.9.0
  • Oracle Retail Customer Management and Segmentation Foundation 19.0

Discovery Timeline

  • 2020-12-02 - CVE-2020-25638 published to the National Vulnerability Database
  • 2021-01 - Debian LTS security announcement published
  • 2021-07 - Oracle Critical Patch Update addresses affected Oracle products
  • 2025-04-23 - Last updated in NVD database

Technical Details for CVE-2020-25638

Vulnerability Analysis

The vulnerability is classified as a SQL Injection weakness [CWE-89] in the Hibernate ORM Criteria API. Hibernate is the most widely deployed object-relational mapping (ORM) framework in the Java ecosystem, providing query abstraction through the JPA Criteria API. When applications enable the hibernate.use_sql_comments setting, Hibernate appends user-controllable literal values as inline SQL comments to generated queries. The Criteria API implementation does not sanitize these literals before embedding them in the comment block.

An attacker who controls a query literal can terminate the comment context and inject arbitrary SQL clauses. The injected SQL is then sent to the database engine and executed in the security context of the application's database user. According to EPSS data, the vulnerability has a moderate probability of exploitation activity.

Root Cause

The root cause is missing input neutralization when serializing literal values into SQL comment markers. The Criteria API trusts that string-form literals are inert when wrapped in /* ... */ syntax. No escaping is performed for sequences that would close the comment delimiter, allowing breakout from the comment context into executable SQL.

Attack Vector

Exploitation requires the target application to use Hibernate's Criteria API and enable SQL comment generation. The attacker supplies crafted literal input through any application interface that flows into a Criteria query. The malicious literal embeds a comment-terminating sequence followed by attacker-controlled SQL. While the attack is network-accessible without authentication, exploitation complexity is elevated because the application must both enable comment generation and use literals in a vulnerable pattern.

No verified public proof-of-concept code is available. See the Red Hat Bug Report #1881353 for technical analysis from the upstream maintainers.

Detection Methods for CVE-2020-25638

Indicators of Compromise

  • Database audit logs containing unexpected SQL statements originating from application service accounts, particularly statements with comment-delimiter sequences such as */ followed by additional SQL clauses.
  • Application logs showing Criteria API queries with literal values containing SQL metacharacters or comment terminators.
  • Anomalous database query volume or schema enumeration patterns from application tier hosts.

Detection Strategies

  • Inventory Java applications and scan dependency manifests (pom.xml, build.gradle) for hibernate-core versions at or below 5.4.23.Final.
  • Audit application configuration for hibernate.use_sql_comments=true combined with Criteria API usage.
  • Enable database query logging and alert on statements containing comment-escape patterns in literal positions.

Monitoring Recommendations

  • Forward database audit events and application logs to a centralized analytics platform for correlation against known SQL injection signatures.
  • Monitor for unexpected UNION, SELECT, or schema-metadata access patterns originating from application database accounts.
  • Track outbound data volumes from database servers to identify potential exfiltration following injection.

How to Mitigate CVE-2020-25638

Immediate Actions Required

  • Upgrade Hibernate ORM to a fixed release beyond 5.4.23.Final.
  • Apply Debian security updates referenced in DSA-4908 and the Debian LTS Announcement.
  • Apply Oracle Critical Patch Updates for affected products as described in the Oracle Security Alert July 2021, April 2022, and July 2022.
  • Audit application code for Criteria API usage with externally controllable literals.

Patch Information

The Hibernate project addressed this issue in releases following 5.4.23.Final. Upstream details are tracked in Red Hat Bug Report #1881353. Distribution-level fixes are available from Debian, and Oracle has shipped corrected components in subsequent Critical Patch Update bundles.

Workarounds

  • Disable SQL comment generation by setting hibernate.use_sql_comments=false in the Hibernate configuration.
  • Refactor Criteria queries to use parameterized expressions rather than inline literals where feasible.
  • Deploy a database firewall or web application firewall rule that blocks comment-delimiter sequences in request parameters bound to query literals.
bash
# Configuration example: disable SQL comment generation in Hibernate
# persistence.xml or hibernate.cfg.xml property
<property name="hibernate.use_sql_comments" value="false"/>

# Or in application.properties (Spring Boot / Quarkus)
hibernate.use_sql_comments=false
spring.jpa.properties.hibernate.use_sql_comments=false

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechHibernate

  • SeverityHIGH

  • CVSS Score7.4

  • EPSS Probability0.68%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-89
  • Technical References
  • Red Hat Bug Report #1881353

  • Apache Bug Report Thread

  • Apache Commits Thread Notification

  • Debian LTS Announcement

  • Debian Security Advisory DSA-4908
  • Vendor Resources
  • Oracle Security Alert July 2021

  • Oracle Security Alert April 2022

  • Oracle Security Alert July 2022
  • Related CVEs
  • CVE-2026-0603: Hibernate SQL Injection Vulnerability

  • CVE-2025-14969: Hibernate Reactive DoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English