CVE-2025-5878ESAPI esapi-java-legacy SQL Injection Defense Encoder.encodeForSQL special element
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.
What to do
Fixed builds are available from Ubuntu: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | libowasp-esapi-java | Fix pending | UBUNTU-CVE-2025-5878 | |
| Ubuntu 26.04 | libowasp-esapi-java | Fix pending | UBUNTU-CVE-2025-5878 | |
| Ubuntu 25.10 | libowasp-esapi-java | Will not fix Stand-alone users should review any use of encodeForSQL, DB2Codec, MySQLCodec, or OracleCodec, as these are deprecated and the update does not fully mitigate… | UBUNTU-CVE-2025-5878 | |
| Ubuntu 24.04 | libowasp-esapi-java | Fixed | 2.4.0.0-2ubuntu0.1 | UBUNTU-CVE-2025-5878 |
| Ubuntu 22.04 | libowasp-esapi-java | Fix pending | 2.2.3.1-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2025-5878 |
| Ubuntu 20.04 | libowasp-esapi-java | Fix pending | 2.1.0-3ubuntu0.20.04.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2025-5878 |
| Ubuntu 18.04 | libowasp-esapi-java | Fix pending | 2.1.0-3ubuntu0.18.04.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2025-5878 |
| Ubuntu 16.04 | libowasp-esapi-java | Fix pending | 2.1.0-2ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2025-5878 |
| Debian 13 | libowasp-esapi-java | Fix pending | DEBIAN-CVE-2025-5878 | |
| Debian 12 | libowasp-esapi-java | Fix pending | DEBIAN-CVE-2025-5878 |
What the vendor says
As published in the CVE record by VulDB, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- esapi-java-legacy: affected: 2.0-rc10, 2.0-rc11, 2.0.1, 2.0GA1, 2.1.0, 2.1.0.1
Vendor advisories:
- 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)
References
- https://vuldb.com/?id.314321
- https://vuldb.com/?ctiid.314321
- https://vuldb.com/?submit.590149
- https://vuldb.com/?submit.590150
- https://github.com/uglory-gll/javasec/blob/main/ESAPI.md
- https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin13.pdf
- https://github.com/ESAPI/esapi-java-legacy/commit/f75ac2c2647a81d2cfbdc9c899f8719c240ed512
- https://github.com/ESAPI/esapi-java-legacy/releases/tag/esapi-2.7.0.0
- https://github.com/ESAPI/esapi-java-legacy/commit/e2322914304d9b1c52523ff24be495b7832f6a56
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.