GHSA-7f42-p84j-f58p

Suggest an improvement
Source
https://github.com/advisories/GHSA-7f42-p84j-f58p
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/03/GHSA-7f42-p84j-f58p/GHSA-7f42-p84j-f58p.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-7f42-p84j-f58p
Aliases
Published
2018-03-21T11:56:32Z
Modified
2024-02-16T08:20:34.576085Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N CVSS Calculator
Summary
Sanitize vulnerable to Improper Input Validation and Cross-site Scripting
Details

When Sanitize <= 4.6.2 is used in combination with libxml2 >= 2.9.2, a specially crafted HTML fragment can cause libxml2 to generate improperly escaped output, allowing non-whitelisted attributes to be used on whitelisted elements.

This can allow HTML and JavaScript injection, which could result in XSS if Sanitize's output is served to browsers.

Database specific
{
    "nvd_published_at": "2018-03-30T19:29:00Z",
    "cwe_ids": [
        "CWE-20",
        "CWE-79"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T21:22:33Z"
}
References

Affected packages

RubyGems / sanitize

Package

Name
sanitize
Purl
pkg:gem/sanitize

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.0.0
Fixed
4.6.3

Affected versions

3.*

3.0.0
3.0.1
3.0.2
3.0.3
3.0.4
3.1.0
3.1.1
3.1.2

4.*

4.0.0
4.0.1
4.1.0
4.2.0
4.3.0
4.4.0
4.5.0
4.6.0
4.6.1
4.6.2