Is sanitize 5.1 vulnerable?
RubyGems · 1 release from 5.1.0 to 5.1.0 · latest sanitize is 7.0.2 · checked 18 Nov 2026
Yes: 3 known advisories
Yes. sanitize 5.1.0, the last 5.1 release, is affected by 3 known security advisories (2 high, 1 medium), including CVE-2023-36823, CVE-2020-4054, CVE-2023-23627. Upgrade to 6.0.2 or later to fix all of them.
bundle update --conservative sanitize # Gemfile: '>= 6.0.2'Is your project on an affected sanitize?
Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Advisories affecting sanitize 5.1.0
Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content
- Affected
- >=3.0.0 <6.0.2
- Fixed in
- 6.0.2
Improper neutralization of `noscript` element content may allow XSS in Sanitize
- Affected
- >=5.0.0 <6.0.1
- Fixed in
- 6.0.1
Cross-site Scripting in Sanitize
- Affected
- >=3.0.0 <5.2.1
- Fixed in
- 5.2.1
Which of your client projects are still on sanitize 5.1?
NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact sanitize version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.
Other sanitize versions
Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the RubyGems registry. Refreshed daily.