SQL injection via backslash quote escaping bypass
Published Jun 29, 2025 · Updated Nov 3, 2025
SQL injection in Encoder.encodeForSQL in OWASP ESAPI for Java (Legacy) 2.0-rc10 through 2.6.2.0 allows remote attackers to execute SQL. The OracleCodec and MySQLCodec ANSI-mode encoders double single quotes without neutralizing a preceding backslash, letting crafted input escape the intended string literal. Reachability requires a consuming application to pass attacker-controlled data through encodeForSQL and concatenate the result into a database query; the demonstrated consequence includes execution of database time-delay functions.
Summary
What happened
SQL injection in Encoder.encodeForSQL in OWASP ESAPI for Java (Legacy) 2.0-rc10 through 2.6.2.0 allows remote attackers to execute SQL. The OracleCodec and MySQLCodec ANSI-mode encoders double single quotes without neutralizing a preceding backslash, letting crafted input escape the intended string literal. Reachability requires a consuming application to pass attacker-controlled data through encodeForSQL and concatenate the result into a database query; the demonstrated consequence includes execution of database time-delay functions.
The record
- CVE
- CVE-2025-5878
- Published
- Jun 29, 2025
- Updated
- Nov 3, 2025
- Vendor
- OWASP ESAPI
- Product
- ESAPI for Java (Legacy)
- Classifications
- CWE-20, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jun 29, 2025CVE publishedPublication date reported by the CVE source.
- Nov 3, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=2.0.1
- Affected versionversion=2.0GA1
- Affected versionversion=2.0-rc10
- Affected versionversion=2.0-rc11
- Affected versionversion=2.1.0
- Affected versionversion=2.1.0.1
- Affected versionversion=2.2.0.0
- Affected versionversion=2.2.0.0-RC1
- Affected versionversion=2.2.0.0-RC2
- Affected versionversion=2.2.0.0-RC3
- Affected versionversion=2.2.1.0
- Affected versionversion=2.2.1.0-RC1
- Affected versionversion=2.2.1.1
- Affected versionversion=2.2.2.0
- Affected versionversion=2.2.3.0
- Affected versionversion=2.2.3.1
- Affected versionversion=2.3.0.0
- Affected versionversion=2.4.0.0
- Affected versionversion=2.5.0.0
- Affected versionversion=2.5.1.0
- Affected versionversion=2.5.2.0
- Affected versionversion=2.5.3.0
- Affected versionversion=2.5.3.1
- Affected versionversion=2.5.4.0
- Affected versionversion=2.5.5.0
- Affected versionversion=2.6.0.0
- Affected versionversion=2.6.1.0
- Affected versionversion=2.6.2.0
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Public exploit references
- ESAPI encodeForSQL bypass proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo