CVE-2015-7580: Rails html sanitizer Cross-Site Scripting Vulnerability
MODERATECVE-2015-7580 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Rails html sanitizer libraries in the RubyGems ecosystem. The issue involves rails-html-sanitizer cross-site scripting vulnerability. Remediation is available by upgrading affected packages to version 1.0.3.
CVE-2015-7580 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2015-7580
To remediate this vulnerability, upgrade all affected Rails html sanitizer dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade rails-html-sanitizer to 1.0.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rails-html-sanitizer
How to Check if You Are Affected
To determine whether your application is affected by CVE-2015-7580, inspect your project dependencies for Rails html sanitizer:
inspect dependencies for rails-html-sanitizer
Analyze the terminal output to locate any version of Rails html sanitizer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Rails html sanitizer, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2015-7580 Affected Rails html sanitizer Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rails-html-sanitizer
|
RubyGems |
< 1.0.3
|
1.0.3
|
References
Frequently Asked Questions
What is CVE-2015-7580?
Which Rails html sanitizer versions are affected?
What version fixes CVE-2015-7580?
Is rails-html-sanitizer affected?
What is the CVSS score of CVE-2015-7580?
What CWE is associated with CVE-2015-7580?
How can I check RubyGems dependencies for CVE-2015-7580?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-ghqm-pgxj-37gq",
"modified" : "2023-01-23T21:16:04Z",
"published" : "2017-10-24T18:33:36Z",
"aliases" : [ "CVE-2015-7580" ],
"summary" : "rails-html-sanitizer Cross-site Scripting vulnerability",
"details" : "Cross-site scripting (XSS) vulnerability in `lib/rails/html/scrubbers.rb` in the rails-html-sanitizer gem before 1.0.3 for Ruby on Rails 4.2.x and 5.x allows remote attackers to inject arbitrary web script or HTML via a crafted CDATA node.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rails-html-sanitizer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-7580"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails-html-sanitizer/commit/63903b0eaa6d2a4e1c91bc86008256c4c8335e78"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails-html-sanitizer"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/message/raw?msg=rubyonrails-security/uh--W4TDwmI/m_CVZtdbFQAJ"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20160128075017/http://www.securitytracker.com/id/1034816"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00014.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00024.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00053.html"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2016/01/25/15"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:37:28Z",
"nvd_published_at" : null
}
}