ActionView sanitize helper bypass with style

Disclosed: 2025-02-06 01:34:06 By mokusou To ibb
Medium
Vulnerability Details
Rails-html-sanitizer, which Rails AtionView also uses, fails to sanitize input when the `style` tag is allowed, leading to XSS. A vulnerable example would have been as follows; ```ruby <%= sanitize @comment.body, tags: ["style"] %> ``` You could see other patterns/places where this is used in the security advisory. View #2519936 for details. ## Impact Sanitizer bypass that leads to XSS on applications built with it. It also affects applications using Rails Action View's sanitize helper: https://api.rubyonrails.org/v7.2/classes/ActionView/Helpers/SanitizeHelper.html
Actions
View on HackerOne
Report Stats
  • Report ID: 2931639
  • State: Closed
  • Substate: resolved
  • Upvotes: 1
Share this report