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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.9
- **CVSS:** 6.9 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: None; Confidentiality impact: Low; Integrity impact: Low; Availability impact: Low; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None; Exploit maturity: Proof of concept
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.90% (percentile 58, 2026-11-26)
- **CWE:** CWE-138, CWE-20
- **Published:** 2025-06-29T11:11:47.327Z
- **Modified:** 2026-06-17T09:48:56.397Z

## Who should check

- Anyone running 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; …

## 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 and fixed versions

- 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; … (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-5878. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-5878.md
Affected: 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; …
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for esapi-java-legacy: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-5878 being exploited?

There is no confirmed exploitation: CVE-2025-5878 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.90% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-5878?

Medium: CVSS 6.9 (v4.0, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2025-5878?

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; ….

### Is there a fix for CVE-2025-5878?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-5878?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <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>
- article: <https://vuldb.com/?id.314321>
- other: <https://vuldb.com/?ctiid.314321>
- other: <https://vuldb.com/?submit.590149>
- other: <https://vuldb.com/?submit.590150>
- other: <https://github.com/uglory-gll/javasec/blob/main/ESAPI.md>
- other: <https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin13.pdf>
- other: <https://lists.debian.org/debian-lts-announce/2025/07/msg00010.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-5878>

HTML: <https://flawdb.com/CVE-2025-5878> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-5878>
