# CVE-2025-5878: ESAPI esapi-java-legacy SQL Injection Defense Encoder.encodeForSQL special element

- Priority: **Routine**
- Reason: Not severe (CVSS 6.9, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-06-29 · Modified: 2025-11-03
- Aliases: UBUNTU-CVE-2025-5878, DEBIAN-CVE-2025-5878, USN-9262-1
- Record: https://cvemate.com/vulnerability/CVE-2025-5878 · JSON: https://cvemate.com/vulnerability/CVE-2025-5878/json

## Description

```text
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.
```

## Signals

- CVSS: 7.5 high (v2.0, CVE.org) AV:N/AC:L/Au:N/C:P/I:P/A:P/E:POC/RL:OF/RC:C
- EPSS: 0.52%, percentile 45.661%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian libowasp-esapi-java (Debian): All versions (No fix recorded)
- ubuntu libowasp-esapi-java (Ubuntu): All versions (No fix recorded) \| \< 2.1.0-2ubuntu0.1~esm1 \| \< 2.1.0-3ubuntu0.18.04.1~esm1 \| \< 2.1.0-3ubuntu0.20.04.1~esm1 \| \< 2.2.3.1-1ubuntu0.1~esm1 \| \< 2.4.0.0-2ubuntu0.1 \| \< 2.4.0.0-2.1ubuntu0.26.10.1 \| \< 2.4.0.0-2.1ubuntu0.26.04.1~esm1
- esapi esapi-java-legacy: 2.0-rc10 \| 2.0-rc11 \| 2.0.1 \| 2.0GA1 \| 2.1.0 \| 2.1.0.1 \| 2.2.0.0 \| 2.2.0.0-RC1 \| 2.2.0.0-RC2 \| 2.2.0.0-RC3 \| 2.2.1.0 \| 2.2.1.0-RC1 \| 2.2.1.1 \| 2.2.2.0 \| 2.2.3.0 \| 2.2.3.1 \| 2.3.0.0 \| 2.4.0.0 \| 2.5.0.0 \| 2.5.1.0 \| 2.5.2.0 \| 2.5.3.0 \| 2.5.3.1 \| 2.5.4.0 \| 2.5.5.0 \| 2.6.0.0 \| 2.6.1.0 \| 2.6.2.0

## 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>
- <https://lists.debian.org/debian-lts-announce/2025/07/msg00010.html>
- <https://ubuntu.com/security/CVE-2025-5878>
- <https://www.cve.org/CVERecord?id=CVE-2025-5878>
- <https://ubuntu.com/security/notices/USN-8181-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-5878>
- <https://ubuntu.com/security/notices/USN-9262-1>

---

Data as of 2026-12-05T08:38:24.993Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
