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

- Severity: Medium 6.9 (CVSS:4.0, scored by VulDB) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.90%, higher than 58% of CVEs (2026-11-30)
- Published: 2025-06-29T11:11:47.327Z
- Modified: 2026-06-17T09:48:56.397Z
- Weaknesses: CWE-20, CWE-138
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulDB

## 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.

(As written by CVE List.)

## Affected

- 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; and 16 more (not affected: 2.7.0.0)

## Every score

- VulDB: CVSS:4.0 6.9 Medium `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`
- VulDB: CVSS:3.1 7.3 High `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`
- VulDB: CVSS:3.0 7.3 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C`
- VulDB: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P/E:POC/RL:OF/RC:C`

## References

- <https://vuldb.com/?id.314321> (technical-description, vdb-entry)
- <https://vuldb.com/?ctiid.314321> (permissions-required, signature)
- <https://vuldb.com/?submit.590149> (third-party-advisory)
- <https://vuldb.com/?submit.590150> (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>

## Sources

- CVE List: [CVE-2025-5878](https://www.cve.org/CVERecord?id=CVE-2025-5878), CVE Terms of Use, modified 2025-11-03
- NVD: [CVE-2025-5878](https://nvd.nist.gov/vuln/detail/CVE-2025-5878), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-5878 · Whole record: https://cve.day/CVE-2025-5878.json · Rebuilt by cve.day 2026-11-25T22:59:00.360Z
