CVSS2
Attack Vector
NETWORK
Attack Complexity
MEDIUM
Authentication
NONE
Confidentiality Impact
NONE
Integrity Impact
PARTIAL
Availability Impact
NONE
AV:N/AC:M/Au:N/C:N/I:P/A:N
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality Impact
LOW
Integrity Impact
LOW
Availability Impact
NONE
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
Percentile
65.6%
There is a possible XSS vulnerability in the white list sanitizer in the
rails-html-sanitizer gem. This vulnerability has been assigned the CVE
identifier CVE-2015-7580.
Versions Affected: All.
Not affected: None.
Fixed Versions: v1.0.3
Carefully crafted strings can cause user input to bypass the sanitization in
the white list sanitizer which will can lead to an XSS attack.
Vulnerable code will look something like this:
<%= sanitize user_input, tags: %w(em) %>
All users running an affected release should either upgrade or use one of the
workarounds immediately.
The FIXED releases are available at the normal locations.
Putting the following monkey patch in an initializer can help to mitigate the
issue:
class Rails::Html::PermitScrubber
alias :old_scrub :scrub
alias :old_skip_node? :skip_node?
def scrub(node)
if node.cdata?
text = node.document.create_text_node node.text
node.replace text
return CONTINUE
end
old_scrub node
end
def skip_node?(node); node.text?; end
end
To aid users who aren’t able to upgrade immediately we have provided patches for
the two supported release series. They are in git-am format and consist of a
single changeset.
Thanks to Arnaud Germis, Nate Clark, and John Colvin for reporting this issue.
Vendor | Product | Version | CPE |
---|---|---|---|
ruby | rails-html-sanitizer | * | cpe:2.3:a:ruby:rails-html-sanitizer:*:*:*:*:*:*:*:* |
CVSS2
Attack Vector
NETWORK
Attack Complexity
MEDIUM
Authentication
NONE
Confidentiality Impact
NONE
Integrity Impact
PARTIAL
Availability Impact
NONE
AV:N/AC:M/Au:N/C:N/I:P/A:N
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality Impact
LOW
Integrity Impact
LOW
Availability Impact
NONE
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
Percentile
65.6%