CVE-2025-5878: esapi-java-legacy · Improper Neutralization of Special Elements
Affects esapi-java-legacySource CVE Database V5
Public exploit available · CVSS 6.9 Medium.
Data as of 26 Oct 2026, 10:12 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 42% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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:PExploitation evidence
Disclosed: evidence found.
CVE published 29 Jun 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: evidence found.
CVSS exploit maturity: proof of concept public
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), CVSS vector, the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Mavenorg.owasp.esapi/esapi-java-legacypkg:maven/org.owasp.esapi/esapi-java-legacyOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
- Upgrade all ESAPI esapi-java-legacy library instances to version 2.7.0.0 or later immediately, as this version disables the vulnerable encodeForSQL feature by default and includes warnings in documentation.
- Conduct a thorough code audit to identify and refactor any usage of Encoder.encodeForSQL, replacing it with safer alternatives such as parameterized SQL queries or prepared statements.
- Implement runtime application self-protection (RASP) or web application firewalls (WAF) with SQL injection detection rules as an additional layer of defense.
- Educate developers about the risks associated with improper encoding and the importance of following secure coding guidelines, especially when handling database inputs.
- Monitor application logs and network traffic for unusual SQL query patterns or injection attempts.
- Establish a patch management process to ensure timely updates of third-party libraries and dependencies.
- Review and update security policies to mandate the use of secure coding practices and regular dependency vulnerability assessments.
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.
References
- vuldb.com (opens in a new tab)
- vuldb.com (opens in a new tab)
- vuldb.com (opens in a new tab)
- vuldb.com (opens in a new tab)
- github.com/uglory-gll/javasec/blob/main/ESAPI.md (opens in a new tab)
- github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin13.pdf (opens in a new tab)
- github.com/ESAPI/esapi-java-legacy/commit/f75ac2c2647a81d2cfbdc9c899f8719c240ed512 (opens in a new tab)
- github.com/ESAPI/esapi-java-legacy/releases/tag/esapi-2.7.0.0 (opens in a new tab)
- github.com/ESAPI/esapi-java-legacy/commit/e2322914304d9b1c52523ff24be495b7832f6a56 (opens in a new tab)
- lists.debian.org/debian-lts-announce/2025/07/msg00010.html (opens in a new tab)