Validator.isValidSafeHTML is being deprecated and will be deleted from org.owasp.esapi:esapi in 1 year
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.
Patches
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.
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Java / Kotlin (Maven) | org.owasp.esapi:esapi | < 2.6.0.0 | 2.6.0.0 |
References
- Weakness (CWE)
-- Platform
- Java / Kotlin (Maven)
- Package
org.owasp.esapi:esapi- Disclosed
- 27.11.2023
- Updated
- 11.10.2026 12:21
Sources and licenses
OSV / GitHub Advisory Database - GHSA-r68h-jhhj-9jvm - CC BY 4.0
Vulnerability history: org.owasp.esapi:esapi
All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 7
- First → latest
- 08.2021 11.2023
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 2
- Medium 4
- Low 1
Disclosures per year
- 2021: 1
- 2022: 4
- 2023: 2
- 2024: 0
- 2025: 0
- 2026: 0
-
Validator.isValidSafeHTML is being deprecated and will be deleted from org.owasp.esapi:esapi in 1 year this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.