Summary
Validator.isValidSafeHTML is being deprecated and will be deleted from org.owasp.esapi:esapi in 1 year
Workarounds
Stop using this method. Note that Validator.getValidSafeHTML is believed to be safe to use with the default antisamy-esapi.xml AntiSamy policy file.
Why is no CVE being filed?
We outline the reasons in the section "Why no CVE for this issue?" in ESAPI Security Bulletin #12. If after reading that, if you still want to file a CVE or this, knock yourself out.
References
CWE-79
CWE-80
ESAPI Security Bulletin #12
Final resolution
This GitHub Security Advisory should now be considered remediated in ESAPI versions 2.6.0.0 and later as the deprecated methods have been removed from the ESAPI jar.
Impact
The Validator.isValidSafeHTML method can result in false negatives where it reports some input as safe (i.e., returns true), but really isn't, and using that same input as-is can in certain circumstances result in XSS vulnerabilities. Because this method cannot be fixed, it is being deprecated and will be removed in one years time from when this advisory is published. Full details may be found in ESAPI Security Bulletin #12.
Note that all versions of ESAPI, that have this method (which dates back to at least the ESAPI 1.3 release more than 15 years ago) have this issue and it will continue to exist until we remove these two methods in a future ESAPI release.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
There is no patch. We do not believe that it is possible to patch this pretentiously named method other then perhaps renaming it to something like Validator.mightThisBeValidSafeHTML to dissuade developers from using it.
Frequently Asked Questions
- What is GHSA-R68H-JHHJ-9JVM? GHSA-R68H-JHHJ-9JVM is a medium-severity security vulnerability in org.owasp.esapi:esapi (maven), affecting versions < 2.6.0.0. It is fixed in 2.6.0.0.
- Which versions of org.owasp.esapi:esapi are affected by GHSA-R68H-JHHJ-9JVM? org.owasp.esapi:esapi (maven) versions < 2.6.0.0 is affected.
- Is there a fix for GHSA-R68H-JHHJ-9JVM? Yes. GHSA-R68H-JHHJ-9JVM is fixed in 2.6.0.0. Upgrade to this version or later.
- Is GHSA-R68H-JHHJ-9JVM exploitable, and should I be worried? Whether GHSA-R68H-JHHJ-9JVM is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-R68H-JHHJ-9JVM is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-R68H-JHHJ-9JVM? Upgrade
org.owasp.esapi:esapito 2.6.0.0 or later.