The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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-2025-5878

CVE-2025-5878: ESAPI esapi-java-legacy SQLi Vulnerability

CVE-2025-5878 is a SQL injection flaw in ESAPI esapi-java-legacy affecting the Encoder.encodeForSQL interface. This remotely exploitable vulnerability allows improper neutralization of special elements. This article covers technical details, affected versions, impact, and mitigation.

Updated: January 22, 2026

CVE-2025-5878 Overview

A vulnerability has been identified in ESAPI (Enterprise Security API) esapi-java-legacy affecting the Encoder.encodeForSQL interface used for SQL Injection defense. This security flaw involves improper neutralization of special elements, which can undermine the intended SQL injection protection mechanisms. The vulnerability can be exploited remotely, and exploit information has been publicly disclosed. The ESAPI project demonstrated exceptional professionalism in handling this security issue after being contacted early in the disclosure process.

Critical Impact

Applications relying on ESAPI's Encoder.encodeForSQL for SQL injection protection may have weakened defenses, potentially allowing attackers to bypass security controls and inject malicious SQL commands.

Affected Products

  • ESAPI esapi-java-legacy versions prior to 2.7.0.0

Discovery Timeline

  • June 29, 2025 - CVE-2025-5878 published to NVD
  • November 3, 2025 - Last updated in NVD database

Technical Details for CVE-2025-5878

Vulnerability Analysis

This vulnerability resides in the SQL Injection defense mechanism within the ESAPI Java library, specifically in the Encoder.encodeForSQL interface. The core issue involves improper input validation (CWE-20), where the encoding function fails to properly neutralize special elements that could be used in SQL injection attacks. This means applications that rely on this ESAPI function for SQL injection protection may not receive the expected level of security, leaving them vulnerable to SQL-based attacks.

The vulnerability is network-accessible, meaning an attacker can exploit it remotely without requiring authentication or user interaction. When successfully exploited, an attacker could potentially bypass the SQL encoding protections and craft malicious SQL queries that the application processes as legitimate commands.

Root Cause

The root cause stems from improper input validation in the Encoder.encodeForSQL implementation. The encoding function does not adequately handle all special elements that could be leveraged for SQL injection attacks. This results in incomplete sanitization of user-supplied input before it is incorporated into SQL queries, allowing specially crafted payloads to pass through the defense mechanism.

Attack Vector

The attack is initiated remotely through the network. An attacker would craft malicious input containing SQL injection payloads specifically designed to bypass the encodeForSQL function's protection mechanisms. This input would be submitted to an application that relies on ESAPI's SQL encoding for protection, and due to the improper neutralization, the malicious SQL elements would not be properly escaped or filtered, allowing the injection attack to succeed.

The vulnerability has been addressed through two commits. The first commit (f75ac2c2647a81d2cfbdc9c899f8719c240ed512) disables the vulnerable feature by default and triggers a warning when usage is attempted. The second commit (e2322914304d9b1c52523ff24be495b7832f6a56) updates the misleading Java class documentation to warn developers about the associated risks.

Detection Methods for CVE-2025-5878

Indicators of Compromise

  • Unusual SQL query patterns in application logs that may indicate injection attempts
  • Error messages or exceptions related to SQL syntax errors from backend databases
  • Unexpected database modifications or data exfiltration activity
  • Application behavior suggesting successful SQL injection exploitation

Detection Strategies

  • Review application dependencies for ESAPI esapi-java-legacy versions prior to 2.7.0.0
  • Scan application source code for usage of Encoder.encodeForSQL interface
  • Implement database query monitoring to detect anomalous SQL patterns
  • Deploy Web Application Firewall (WAF) rules to identify SQL injection attempts targeting known bypass techniques

Monitoring Recommendations

  • Enable detailed logging on database servers to capture all SQL queries
  • Monitor application logs for warnings triggered by deprecated encodeForSQL usage
  • Implement real-time alerting for SQL injection attack signatures
  • Track security events related to database access and query execution

How to Mitigate CVE-2025-5878

Immediate Actions Required

  • Upgrade ESAPI esapi-java-legacy to version 2.7.0.0 or later immediately
  • Review all application code that uses Encoder.encodeForSQL and consider alternative SQL injection defenses
  • Implement parameterized queries or prepared statements as the primary SQL injection prevention mechanism
  • Deploy additional input validation layers independent of ESAPI encoding

Patch Information

The vulnerability has been addressed in ESAPI esapi-java-legacy version 2.7.0.0. Two specific commits were made to remediate the issue:

  • Commit f75ac2c2647a81d2cfbdc9c899f8719c240ed512 - Disables the vulnerable feature by default and warns on usage attempts
  • Commit e2322914304d9b1c52523ff24be495b7832f6a56 - Updates misleading documentation to warn about risks

For additional details, refer to the ESAPI Security Bulletin 13 and the official release notes for v2.7.0.0. Debian users should also review the Debian LTS Security Announcement.

Workarounds

  • Avoid using Encoder.encodeForSQL and instead use parameterized queries or prepared statements for all database interactions
  • Implement additional input validation and sanitization before any data reaches the SQL encoding layer
  • Use database-specific escaping functions provided by your JDBC driver or ORM framework
  • Deploy a Web Application Firewall (WAF) with SQL injection protection rules as a defense-in-depth measure
bash
# Maven dependency update to patched version
# Update pom.xml to use ESAPI 2.7.0.0 or later:
# <dependency>
#     <groupId>org.owasp.esapi</groupId>
#     <artifactId>esapi</artifactId>
#     <version>2.7.0.0</version>
# </dependency>

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechEsapi

  • SeverityMEDIUM

  • CVSS Score6.9

  • EPSS Probability0.14%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-20
  • Technical References
  • GitHub ESAPI Security Bulletin 13

  • GitHub ESAPI Commit e2322914

  • GitHub ESAPI Commit f75ac2c2

  • GitHub ESAPI Release v2.7.0.0

  • GitHub ESAPI Documentation

  • VulDB #314321 (CTI ID)

  • VulDB #314321

  • VulDB Submission #590149

  • VulDB Submission #590150

  • Debian LTS Announcement
  • Latest CVEs
  • CVE-2026-35467: Browser API Key Information Disclosure

  • CVE-2026-35466: cveInterface.js XSS Vulnerability

  • CVE-2026-30252: ZenShare Suite XSS Vulnerability

  • CVE-2026-30251: ZenShare Suite v17.0 XSS Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now 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