Skip to content
OpenAdvisories
High · 7.5 CVE-2018-3740 EUVD-2018-0174GHSA-7f42-p84j-f58p

Sanitize vulnerable to Improper Input Validation and Cross-site Scripting

Published Mar 30, 2018 · Updated Aug 5, 2024 · Assigned by hackerone

Description

A specially crafted HTML fragment can cause Sanitize gem for Ruby to allow non-whitelisted attributes to be used on a whitelisted HTML element.

Affected products

VendorProductAffectedFixed
Ryan Grove sanitize (ruby gem) < 4.6.3 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 ruby-sanitize 4.6.6-1 —
Debian 13 ruby-sanitize 4.6.6-1 —
Debian 12 ruby-sanitize 4.6.6-1 —
Debian 9 ruby-sanitize 2.1.0-2+deb9u1 DSA-4358-1
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS ruby-sanitize 2.1.0-2+deb9u1build0.18.04.1 —
Ubuntu 16.04 LTS ruby-sanitize 2.1.0-2+deb9u1build0.16.04.1 —

Affected packages

EcosystemPackageAffectedFixedRecord
RubyGems sanitize >= 3.0.0, < 4.6.3 4.6.3 GHSA-7f42-p84j-f58p

Advisories 1

References