CVE-2018-3740
mediumpriority · track · 31EPSS 0.015 · 74 %ileEURUUSEPSS · scored 2026-10-27
A specially crafted HTML fragment can cause Sanitize gem for Ruby to allow non-whitelisted attributes to be used on a whitelisted HTML element.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 5–7.5
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (6)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-7f42-p84j-f58pSanitize vulnerable to Improper Input Validation and Cross-site Scripting2018-03-21ghsa · osvUS
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.
also known as (4)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (10)
External citations — patches, advisories, analysis.
- https://github.com/rgrove/sanitize/commit/01629a162e448a83d901456d0ba8b65f3b03d46ecnnvd
- https://github.com/rgrove/sanitize/issues/176cnnvd
- https://about.gitlab.com/2018/06/25/security-release-gitlab-11-dot-0-dot-1-released/enisa_euvd
- https://github.com/rgrove/sanitize/commit/01629a162e448a83d901456d0ba8b65f3b03d46eenisa_euvd
- https://github.com/rgrove/sanitize/issues/176enisa_euvd
- https://www.debian.org/security/2018/dsa-4358enisa_euvd
- https://about.gitlab.com/2018/06/25/security-release-gitlab-11-dot-0-dot-1-released/nvd
- https://github.com/rgrove/sanitize/commit/01629a162e448a83d901456d0ba8b65f3b03d46ePatchThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan