gsd-2015-7579
Vulnerability from gsd
Modified
2016-01-25 00:00
Details
There is a XSS vulnerability in `Rails::Html::FullSanitizer` used by Action View's `strip_tags`.
This vulnerability has been assigned the CVE identifier CVE-2015-7579.
Versions Affected: 1.0.2
Not affected: 1.0.0, 1.0.1
Fixed Versions: 1.0.3
Impact
------
Due to the way that `Rails::Html::FullSanitizer` is implemented, if an attacker
passes an already escaped HTML entity to the input of Action View's `strip_tags`
these entities will be unescaped what may cause a XSS attack if used in combination
with `raw` or `html_safe`.
For example:
strip_tags("<script>alert('XSS')</script>")
Would generate:
<script>alert('XSS')</script>
After the fix it will generate:
<script>alert('XSS')</script>
All users running an affected release should either upgrade or use one of the
workarounds immediately.
Releases
--------
The FIXED releases are available at the normal locations.
Workarounds
-----------
If you can't upgrade, please use the following monkey patch in an initializer
that is loaded before your application:
```
$ cat config/initializers/strip_tags_fix.rb
class ActionView::Base
def strip_tags(html)
self.class.full_sanitizer.sanitize(html)
end
end
```
Patches
-------
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.
* Do-not-unescape-already-escaped-HTML-entities.patch
Credits
-------
Thank you to Arthur Neves from GitHub and Spyros Livathinos from Zendesk for
reporting the problem and working with us to fix it.
Aliases
Aliases
{ "GSD": { "alias": "CVE-2015-7579", "description": "Cross-site scripting (XSS) vulnerability in the rails-html-sanitizer gem 1.0.2 for Ruby on Rails 4.2.x and 5.x allows remote attackers to inject arbitrary web script or HTML via an HTML entity that is mishandled by the Rails::Html::FullSanitizer class.", "id": "GSD-2015-7579", "references": [ "https://www.suse.com/security/cve/CVE-2015-7579.html" ] }, "gsd": { "metadata": { "exploitCode": "unknown", "remediation": "unknown", "reportConfidence": "confirmed", "type": "vulnerability" }, "osvSchema": { "affected": [ { "package": { "ecosystem": "RubyGems", "name": "rails-html-sanitizer", "purl": "pkg:gem/rails-html-sanitizer" } } ], "aliases": [ "CVE-2015-7579", "GHSA-r9c2-cr39-c8g6" ], "details": "There is a XSS vulnerability in `Rails::Html::FullSanitizer` used by Action View\u0027s `strip_tags`.\nThis vulnerability has been assigned the CVE identifier CVE-2015-7579.\n\nVersions Affected: 1.0.2\nNot affected: 1.0.0, 1.0.1\nFixed Versions: 1.0.3\n\nImpact\n------\nDue to the way that `Rails::Html::FullSanitizer` is implemented, if an attacker\npasses an already escaped HTML entity to the input of Action View\u0027s `strip_tags`\nthese entities will be unescaped what may cause a XSS attack if used in combination\nwith `raw` or `html_safe`.\n\nFor example:\n\n strip_tags(\"\u0026lt;script\u0026gt;alert(\u0027XSS\u0027)\u0026lt;/script\u0026gt;\")\n\nWould generate:\n\n \u003cscript\u003ealert(\u0027XSS\u0027)\u003c/script\u003e\n\nAfter the fix it will generate:\n\n \u0026lt;script\u0026gt;alert(\u0027XSS\u0027)\u0026lt;/script\u0026gt;\n\nAll users running an affected release should either upgrade or use one of the\nworkarounds immediately.\n\nReleases\n--------\nThe FIXED releases are available at the normal locations.\n\nWorkarounds\n-----------\nIf you can\u0027t upgrade, please use the following monkey patch in an initializer\nthat is loaded before your application:\n\n```\n$ cat config/initializers/strip_tags_fix.rb\nclass ActionView::Base\n def strip_tags(html)\n self.class.full_sanitizer.sanitize(html)\n end\nend\n```\n\nPatches\n-------\nTo aid users who aren\u0027t able to upgrade immediately we have provided patches\nfor the two supported release series. They are in git-am format and consist\nof a single changeset.\n\n* Do-not-unescape-already-escaped-HTML-entities.patch\n\nCredits\n-------\nThank you to Arthur Neves from GitHub and Spyros Livathinos from Zendesk for\nreporting the problem and working with us to fix it.\n", "id": "GSD-2015-7579", "modified": "2016-01-25T00:00:00.000Z", "published": "2016-01-25T00:00:00.000Z", "references": [ { "type": "WEB", "url": "https://groups.google.com/forum/#!topic/rubyonrails-security/OU9ugTZcbjc" } ], "schema_version": "1.4.0", "severity": [ { "score": 6.1, "type": "CVSS_V3" } ], "summary": "XSS vulnerability in rails-html-sanitizer" } }, "namespaces": { "cve.org": { "CVE_data_meta": { "ASSIGNER": "secalert@redhat.com", "ID": "CVE-2015-7579", "STATE": "PUBLIC" }, "affects": { "vendor": { "vendor_data": [ { "product": { "product_data": [ { "product_name": "n/a", "version": { "version_data": [ { "version_value": "n/a" } ] } } ] }, "vendor_name": "n/a" } ] } }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "eng", "value": "Cross-site scripting (XSS) vulnerability in the rails-html-sanitizer gem 1.0.2 for Ruby on Rails 4.2.x and 5.x allows remote attackers to inject arbitrary web script or HTML via an HTML entity that is mishandled by the Rails::Html::FullSanitizer class." } ] }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "eng", "value": "n/a" } ] } ] }, "references": { "reference_data": [ { "name": "https://github.com/rails/rails-html-sanitizer/commit/49dfc1584c5b8e35a4ffabf8356ba3df025e8d3f", "refsource": "CONFIRM", "url": "https://github.com/rails/rails-html-sanitizer/commit/49dfc1584c5b8e35a4ffabf8356ba3df025e8d3f" }, { "name": "[ruby-security-ann] 20160125 [CVE-2015-7579] XSS vulnerability in rails-html-sanitizer", "refsource": "MLIST", "url": "https://groups.google.com/forum/message/raw?msg=ruby-security-ann/OU9ugTZcbjc/uksRkSxZEgAJ" }, { "name": "FEDORA-2016-3a2606f993", "refsource": "FEDORA", "url": "http://lists.fedoraproject.org/pipermail/package-announce/2016-February/178046.html" }, { "name": "SUSE-SU-2016:1146", "refsource": "SUSE", "url": "http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00053.html" }, { "name": "1034816", "refsource": "SECTRACK", "url": "http://www.securitytracker.com/id/1034816" }, { "name": "[oss-security] 20160125 [CVE-2015-7579] XSS vulnerability in rails-html-sanitizer", "refsource": "MLIST", "url": "http://www.openwall.com/lists/oss-security/2016/01/25/12" }, { "name": "FEDORA-2016-59ce8b61dd", "refsource": "FEDORA", "url": "http://lists.fedoraproject.org/pipermail/package-announce/2016-February/178064.html" }, { "name": "SUSE-SU-2016:0391", "refsource": "SUSE", "url": "http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00024.html" }, { "name": "openSUSE-SU-2016:0356", "refsource": "SUSE", "url": "http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00014.html" } ] } }, "github.com/rubysec/ruby-advisory-db": { "cve": "2015-7579", "cvss_v3": 6.1, "date": "2016-01-25", "description": "There is a XSS vulnerability in `Rails::Html::FullSanitizer` used by Action View\u0027s `strip_tags`.\nThis vulnerability has been assigned the CVE identifier CVE-2015-7579.\n\nVersions Affected: 1.0.2\nNot affected: 1.0.0, 1.0.1\nFixed Versions: 1.0.3\n\nImpact\n------\nDue to the way that `Rails::Html::FullSanitizer` is implemented, if an attacker\npasses an already escaped HTML entity to the input of Action View\u0027s `strip_tags`\nthese entities will be unescaped what may cause a XSS attack if used in combination\nwith `raw` or `html_safe`.\n\nFor example:\n\n strip_tags(\"\u0026lt;script\u0026gt;alert(\u0027XSS\u0027)\u0026lt;/script\u0026gt;\")\n\nWould generate:\n\n \u003cscript\u003ealert(\u0027XSS\u0027)\u003c/script\u003e\n\nAfter the fix it will generate:\n\n \u0026lt;script\u0026gt;alert(\u0027XSS\u0027)\u0026lt;/script\u0026gt;\n\nAll users running an affected release should either upgrade or use one of the\nworkarounds immediately.\n\nReleases\n--------\nThe FIXED releases are available at the normal locations.\n\nWorkarounds\n-----------\nIf you can\u0027t upgrade, please use the following monkey patch in an initializer\nthat is loaded before your application:\n\n```\n$ cat config/initializers/strip_tags_fix.rb\nclass ActionView::Base\n def strip_tags(html)\n self.class.full_sanitizer.sanitize(html)\n end\nend\n```\n\nPatches\n-------\nTo aid users who aren\u0027t able to upgrade immediately we have provided patches\nfor the two supported release series. They are in git-am format and consist\nof a single changeset.\n\n* Do-not-unescape-already-escaped-HTML-entities.patch\n\nCredits\n-------\nThank you to Arthur Neves from GitHub and Spyros Livathinos from Zendesk for\nreporting the problem and working with us to fix it.\n", "gem": "rails-html-sanitizer", "ghsa": "r9c2-cr39-c8g6", "patched_versions": [ "\u003e= 1.0.3" ], "title": "XSS vulnerability in rails-html-sanitizer", "unaffected_versions": [ "~\u003e 1.0.0", "~\u003e 1.0.1" ], "url": "https://groups.google.com/forum/#!topic/rubyonrails-security/OU9ugTZcbjc" }, "gitlab.com": { "advisories": [ { "affected_range": "1.0.2", "affected_versions": "Version 1.0.2", "credit": "Arthur Neves from GitHub and Spyros Livathinos from Zendesk", "cvss_v2": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "cvss_v3": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "cwe_ids": [ "CWE-1035", "CWE-79", "CWE-937" ], "date": "2019-08-08", "description": "Due to the way that `Rails::Html::FullSanitizer` is implemented, if an attacker passes an already escaped HTML entity to the input of Action View\u0027s `strip_tags` these entities will be unescaped what may cause a XSS attack if used in combination with `raw` or `html_safe`. ", "fixed_versions": [ "1.0.3" ], "identifier": "CVE-2015-7579", "identifiers": [ "CVE-2015-7579" ], "not_impacted": "1.0.0, 1.0.1", "package_slug": "gem/rails-html-sanitizer", "pubdate": "2016-02-15", "solution": "Upgrade to latest, apply patch or use workaround. See provided link.", "title": "XSS vulnerability in strip_tags", "urls": [ "https://groups.google.com/forum/#!topic/rubyonrails-security/OU9ugTZcbjc" ], "uuid": "7cff9cf7-f7d3-4b5e-b741-884dee49e1b0" } ] }, "nvd.nist.gov": { "configurations": { "CVE_data_version": "4.0", "nodes": [ { "children": [ { "children": [], "cpe_match": [ { "cpe23Uri": "cpe:2.3:a:rubyonrails:html_sanitizer:*:*:*:*:*:ruby:*:*", "cpe_name": [], "versionEndIncluding": "1.0.2", "vulnerable": true } ], "operator": "OR" }, { "children": [], "cpe_match": [ { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:5.0.0:beta3:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:5.0.0:beta2:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.5:rc1:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.5:*:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.1:rc3:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.1:rc2:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.0:beta2:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.0:beta1:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:5.0.0:beta1.1:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:5.0.0:beta1:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.4:rc1:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.4:*:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.1:rc1:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.1:*:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.0:rc3:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.0:*:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.5.1:*:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.5:rc2:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.2:*:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.1:rc4:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.0:beta4:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.0:beta3:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.6:rc1:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.5.2:*:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.3:rc1:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.3:*:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.0:rc2:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false }, { "cpe23Uri": "cpe:2.3:a:rubyonrails:rails:4.2.0:rc1:*:*:*:*:*:*", "cpe_name": [], "vulnerable": false } ], "operator": "OR" } ], "cpe_match": [], "operator": "AND" } ] }, "cve": { "CVE_data_meta": { "ASSIGNER": "secalert@redhat.com", "ID": "CVE-2015-7579" }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "en", "value": "Cross-site scripting (XSS) vulnerability in the rails-html-sanitizer gem 1.0.2 for Ruby on Rails 4.2.x and 5.x allows remote attackers to inject arbitrary web script or HTML via an HTML entity that is mishandled by the Rails::Html::FullSanitizer class." } ] }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "en", "value": "CWE-79" } ] } ] }, "references": { "reference_data": [ { "name": "[oss-security] 20160125 [CVE-2015-7579] XSS vulnerability in rails-html-sanitizer", "refsource": "MLIST", "tags": [], "url": "http://www.openwall.com/lists/oss-security/2016/01/25/12" }, { "name": "[ruby-security-ann] 20160125 [CVE-2015-7579] XSS vulnerability in rails-html-sanitizer", "refsource": "MLIST", "tags": [], "url": "https://groups.google.com/forum/message/raw?msg=ruby-security-ann/OU9ugTZcbjc/uksRkSxZEgAJ" }, { "name": "https://github.com/rails/rails-html-sanitizer/commit/49dfc1584c5b8e35a4ffabf8356ba3df025e8d3f", "refsource": "CONFIRM", "tags": [], "url": "https://github.com/rails/rails-html-sanitizer/commit/49dfc1584c5b8e35a4ffabf8356ba3df025e8d3f" }, { "name": "SUSE-SU-2016:1146", "refsource": "SUSE", "tags": [], "url": "http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00053.html" }, { "name": "FEDORA-2016-3a2606f993", "refsource": "FEDORA", "tags": [], "url": "http://lists.fedoraproject.org/pipermail/package-announce/2016-February/178046.html" }, { "name": "FEDORA-2016-59ce8b61dd", "refsource": "FEDORA", "tags": [], "url": "http://lists.fedoraproject.org/pipermail/package-announce/2016-February/178064.html" }, { "name": "openSUSE-SU-2016:0356", "refsource": "SUSE", "tags": [], "url": "http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00014.html" }, { "name": "SUSE-SU-2016:0391", "refsource": "SUSE", "tags": [], "url": "http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00024.html" }, { "name": "1034816", "refsource": "SECTRACK", "tags": [], "url": "http://www.securitytracker.com/id/1034816" } ] } }, "impact": { "baseMetricV2": { "cvssV2": { "accessComplexity": "MEDIUM", "accessVector": "NETWORK", "authentication": "NONE", "availabilityImpact": "NONE", "baseScore": 4.3, "confidentialityImpact": "NONE", "integrityImpact": "PARTIAL", "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "version": "2.0" }, "exploitabilityScore": 8.6, "impactScore": 2.9, "obtainAllPrivilege": false, "obtainOtherPrivilege": false, "obtainUserPrivilege": false, "severity": "MEDIUM", "userInteractionRequired": true }, "baseMetricV3": { "cvssV3": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "NONE", "baseScore": 6.1, "baseSeverity": "MEDIUM", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "privilegesRequired": "NONE", "scope": "CHANGED", "userInteraction": "REQUIRED", "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "version": "3.0" }, "exploitabilityScore": 2.8, "impactScore": 2.7 } }, "lastModifiedDate": "2019-08-08T15:16Z", "publishedDate": "2016-02-16T02:59Z" } } }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.