Vulnerability · Published Jun 29, 2025 · Assigned by VulDB
CVE-2025-5878ESAPI esapi-java-legacy SQL Injection Defense Encoder.encodeForSQL special element
High 7.3
In plain English
A high-severity improper input validation in esapi-java-legacy from ESAPI. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 43% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
A vulnerability was found in ESAPI esapi-java-legacy and classified as problematic. This issue affects the interface Encoder.encodeForSQL of the SQL Injection Defense. An attack leads to an improper neutralization of special elements. The attack may be initiated remotely and an exploit has been disclosed to the public. The project was contacted early about this issue and handled it with an exceptional level of professionalism. Upgrading to version 2.7.0.0 is able to address this issue. Commit ID f75ac2c2647a81d2cfbdc9c899f8719c240ed512 is disabling the feature by default and any attempt to use it will trigger a warning. And commit ID e2322914304d9b1c52523ff24be495b7832f6a56 is updating the misleading Java class documentation to warn about the risks.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | libowasp-esapi-java | no fix listed | DEBIAN-CVE-2025-5878 |
| Debian:13 | libowasp-esapi-java | no fix listed | DEBIAN-CVE-2025-5878 |
| Ubuntu:24.04:LTS | libowasp-esapi-java | 2.4.0.0-2ubuntu0.1 | UBUNTU-CVE-2025-5878 |
| Ubuntu:25.10 | libowasp-esapi-java | no fix listed | UBUNTU-CVE-2025-5878 |
| Ubuntu:26.04:LTS | libowasp-esapi-java | no fix listed | UBUNTU-CVE-2025-5878 |
| Ubuntu:26.10 | libowasp-esapi-java | no fix listed | UBUNTU-CVE-2025-5878 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| ESAPI | esapi-java-legacy | 2.0-rc102.0-rc112.0.12.0GA12.1.02.1.0.12.2.0.02.2.0.0-RC1 |
Weakness: CWE-138, CWE-20 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C
References
- VDB-314321 | ESAPI esapi-java-legacy SQL Injection Defense Encoder.encodeForSQL special element vdb-entry, technical-description
- VDB-314321 | CTI Indicators (IOB, IOC, IOA) signature, permissions-required
- Submit #590149 | ESAPI esapi-java-legacy 2.6.2.0 SQL injection filtering bypass1 third-party-advisory
- Submit #590150 | ESAPI esapi-java-legacy 2.6.2.0 SQL injection filtering bypass2 (Duplicate) third-party-advisory
- https://github.com/uglory-gll/javasec/blob/main/ESAPI.md related
- https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin13.pdf related
- https://github.com/ESAPI/esapi-java-legacy/commit/f75ac2c2647a81d2cfbdc9c899f8719c240ed512 patch
- https://github.com/ESAPI/esapi-java-legacy/releases/tag/esapi-2.7.0.0 patch
- https://github.com/ESAPI/esapi-java-legacy/commit/e2322914304d9b1c52523ff24be495b7832f6a56 patch
- https://lists.debian.org/debian-lts-announce/2025/07/msg00010.html