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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | sanitize | >= 3.0.0, < 4.6.3 | 4.6.3 | GHSA-7f42-p84j-f58p |
Advisories 1
- DSA-4358-1 ruby-sanitize - security update Debian Security (DSA / DLA) · Mar 9, 2026