CVE-2025-5878: ESAPI 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ESAPI esapi-java-legacyto a version that resolves this vulnerability.Fixed in 2.7.0.0 - Configuration
Disable the Encoder.encodeForSQL feature by default; attempts to use it should trigger a warning.
ESAPI esapi-java-legacy SQL Injection Defense Encoder.encodeForSQL = disabled by default
Event History
Frequently Asked Questions
What is the severity of CVE-2025-5878?
CVE-2025-5878 is classified as problematic due to its potential exploitation through SQL injection.
How do I fix CVE-2025-5878?
To resolve CVE-2025-5878, upgrade ESAPI esapi-java-legacy to version 2.7.0.0 or later.
What software is affected by CVE-2025-5878?
CVE-2025-5878 affects ESAPI esapi-java-legacy versions prior to 2.7.0.0.
Can CVE-2025-5878 be exploited remotely?
Yes, CVE-2025-5878 can be exploited remotely by an attacker.
What kind of attacks can CVE-2025-5878 facilitate?
CVE-2025-5878 facilitates SQL injection attacks due to improper neutralization of special elements.