Skip to content

Validator.isValidSafeHTML is being deprecated and will be deleted in 1 year

Low
kwwall published GHSA-r68h-jhhj-9jvm Nov 24, 2023

Package

No package listed

Affected versions

< 2.6.0.0

Patched versions

2.6.0.0

Description

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.

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N

CVE ID

No known CVE

Weaknesses