gsd-2020-8184
Vulnerability from gsd
Modified
2020-06-15 00:00
Details
It is possible to forge a secure or host-only cookie prefix in Rack using
an arbitrary cookie write by using URL encoding (percent-encoding) on the
name of the cookie. This could result in an application that is dependent on
this prefix to determine if a cookie is safe to process being manipulated
into processing an insecure or cross-origin request.
This vulnerability has been assigned the CVE identifier CVE-2020-8184.
Versions Affected: rack < 2.2.3, rack < 2.1.4
Not affected: Applications which do not rely on __Host- and __Secure- prefixes to determine if a cookie is safe to process
Fixed Versions: rack >= 2.2.3, rack >= 2.1.4
Impact
------
An attacker may be able to trick a vulnerable application into processing an
insecure (non-SSL) or cross-origin request if they can gain the ability to write
arbitrary cookies that are sent to the application.
Workarounds
-----------
If your application is impacted but you cannot upgrade to the released versions or apply
the provided patch, this issue can be temporarily addressed by adding the following workaround:
```
module Rack
module Utils
module_function def parse_cookies_header(header)
return {} unless header
header.split(/[;] */n).each_with_object({}) do |cookie, cookies|
next if cookie.empty?
key, value = cookie.split('=', 2)
cookies[key] = (unescape(value) rescue value) unless cookies.key?(key)
end
end
end
end
```
Aliases
Aliases
{ "GSD": { "alias": "CVE-2020-8184", "description": "A reliance on cookies without validation/integrity check security vulnerability exists in rack \u003c 2.2.3, rack \u003c 2.1.4 that makes it is possible for an attacker to forge a secure or host-only cookie prefix.", "id": "GSD-2020-8184", "references": [ "https://www.suse.com/security/cve/CVE-2020-8184.html", "https://access.redhat.com/errata/RHSA-2020:4366", "https://ubuntu.com/security/CVE-2020-8184", "https://advisories.mageia.org/CVE-2020-8184.html" ] }, "gsd": { "metadata": { "exploitCode": "unknown", "remediation": "unknown", "reportConfidence": "confirmed", "type": "vulnerability" }, "osvSchema": { "affected": [ { "package": { "ecosystem": "RubyGems", "name": "rack", "purl": "pkg:gem/rack" } } ], "aliases": [ "CVE-2020-8184", "GHSA-j6w9-fv6q-3q52" ], "details": "It is possible to forge a secure or host-only cookie prefix in Rack using\nan arbitrary cookie write by using URL encoding (percent-encoding) on the\nname of the cookie. This could result in an application that is dependent on\nthis prefix to determine if a cookie is safe to process being manipulated\ninto processing an insecure or cross-origin request.\nThis vulnerability has been assigned the CVE identifier CVE-2020-8184.\n\nVersions Affected: rack \u003c 2.2.3, rack \u003c 2.1.4\nNot affected: Applications which do not rely on __Host- and __Secure- prefixes to determine if a cookie is safe to process\nFixed Versions: rack \u003e= 2.2.3, rack \u003e= 2.1.4\n\nImpact\n------\n\nAn attacker may be able to trick a vulnerable application into processing an\ninsecure (non-SSL) or cross-origin request if they can gain the ability to write\narbitrary cookies that are sent to the application.\n\nWorkarounds\n-----------\n\nIf your application is impacted but you cannot upgrade to the released versions or apply\nthe provided patch, this issue can be temporarily addressed by adding the following workaround:\n\n```\nmodule Rack\n module Utils\n module_function def parse_cookies_header(header)\n return {} unless header\n header.split(/[;] */n).each_with_object({}) do |cookie, cookies|\n next if cookie.empty?\n key, value = cookie.split(\u0027=\u0027, 2)\n cookies[key] = (unescape(value) rescue value) unless cookies.key?(key)\n end\n end\n end\nend\n```\n", "id": "GSD-2020-8184", "modified": "2020-06-15T00:00:00.000Z", "published": "2020-06-15T00:00:00.000Z", "references": [ { "type": "WEB", "url": "https://groups.google.com/g/rubyonrails-security/c/OWtmozPH9Ak" } ], "schema_version": "1.4.0", "severity": [ { "score": 7.5, "type": "CVSS_V3" } ], "summary": "Percent-encoded cookies can be used to overwrite existing prefixed cookie names" } }, "namespaces": { "cve.org": { "CVE_data_meta": { "ASSIGNER": "support@hackerone.com", "ID": "CVE-2020-8184", "STATE": "PUBLIC" }, "affects": { "vendor": { "vendor_data": [ { "product": { "product_data": [ { "product_name": "https://github.com/rack/rack", "version": { "version_data": [ { "version_value": "rack \u003e= 2.2.3, rack \u003e= 2.1.4" } ] } } ] }, "vendor_name": "n/a" } ] } }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "eng", "value": "A reliance on cookies without validation/integrity check security vulnerability exists in rack \u003c 2.2.3, rack \u003c 2.1.4 that makes it is possible for an attacker to forge a secure or host-only cookie prefix." } ] }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "eng", "value": "Reliance on Cookies without Validation and Integrity Checking in a Security Decision (CWE-784)" } ] } ] }, "references": { "reference_data": [ { "name": "https://hackerone.com/reports/895727", "refsource": "MISC", "url": "https://hackerone.com/reports/895727" }, { "name": "https://groups.google.com/g/rubyonrails-security/c/OWtmozPH9Ak", "refsource": "MISC", "url": "https://groups.google.com/g/rubyonrails-security/c/OWtmozPH9Ak" }, { "name": "[debian-lts-announce] 20200710 [SECURITY] [DLA 2275-1] ruby-rack security update", "refsource": "MLIST", "url": "https://lists.debian.org/debian-lts-announce/2020/07/msg00006.html" }, { "name": "USN-4561-1", "refsource": "UBUNTU", "url": "https://usn.ubuntu.com/4561-1/" }, { "name": "[debian-lts-announce] 20230130 [SECURITY] [DLA 3298-1] ruby-rack security update", "refsource": "MLIST", "url": "https://lists.debian.org/debian-lts-announce/2023/01/msg00038.html" } ] } }, "github.com/rubysec/ruby-advisory-db": { "cve": "2020-8184", "cvss_v3": 7.5, "date": "2020-06-15", "description": "It is possible to forge a secure or host-only cookie prefix in Rack using\nan arbitrary cookie write by using URL encoding (percent-encoding) on the\nname of the cookie. This could result in an application that is dependent on\nthis prefix to determine if a cookie is safe to process being manipulated\ninto processing an insecure or cross-origin request.\nThis vulnerability has been assigned the CVE identifier CVE-2020-8184.\n\nVersions Affected: rack \u003c 2.2.3, rack \u003c 2.1.4\nNot affected: Applications which do not rely on __Host- and __Secure- prefixes to determine if a cookie is safe to process\nFixed Versions: rack \u003e= 2.2.3, rack \u003e= 2.1.4\n\nImpact\n------\n\nAn attacker may be able to trick a vulnerable application into processing an\ninsecure (non-SSL) or cross-origin request if they can gain the ability to write\narbitrary cookies that are sent to the application.\n\nWorkarounds\n-----------\n\nIf your application is impacted but you cannot upgrade to the released versions or apply\nthe provided patch, this issue can be temporarily addressed by adding the following workaround:\n\n```\nmodule Rack\n module Utils\n module_function def parse_cookies_header(header)\n return {} unless header\n header.split(/[;] */n).each_with_object({}) do |cookie, cookies|\n next if cookie.empty?\n key, value = cookie.split(\u0027=\u0027, 2)\n cookies[key] = (unescape(value) rescue value) unless cookies.key?(key)\n end\n end\n end\nend\n```\n", "gem": "rack", "ghsa": "j6w9-fv6q-3q52", "patched_versions": [ "~\u003e 2.1.4", "\u003e= 2.2.3" ], "title": "Percent-encoded cookies can be used to overwrite existing prefixed cookie names", "url": "https://groups.google.com/g/rubyonrails-security/c/OWtmozPH9Ak" }, "gitlab.com": { "advisories": [ { "affected_range": "\u003c2.1.4||\u003e=2.2.0 \u003c2.2.3", "affected_versions": "All versions before 2.1.4, all versions starting from 2.2.0 before 2.2.3", "cvss_v2": "AV:N/AC:L/Au:N/C:N/I:P/A:N", "cvss_v3": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N", "cwe_ids": [ "CWE-1035", "CWE-20", "CWE-937" ], "date": "2020-10-05", "description": "A reliance on cookies without `validation/integrity` check security vulnerability exists in rack that makes it is possible for an attacker to forge a secure or host-only cookie prefix.", "fixed_versions": [ "2.1.4", "2.2.3" ], "identifier": "CVE-2020-8184", "identifiers": [ "CVE-2020-8184" ], "not_impacted": "All versions starting from 2.1.4 before 2.2.0, all versions starting from 2.2.3", "package_slug": "gem/rack", "pubdate": "2020-06-19", "solution": "Upgrade to versions 2.1.4, 2.2.3 or above.", "title": "Improper Input Validation", "urls": [ "https://nvd.nist.gov/vuln/detail/CVE-2020-8184" ], "uuid": "b960a2e0-c5c1-4117-b443-bf772494bcb7" } ] }, "nvd.nist.gov": { "configurations": { "CVE_data_version": "4.0", "nodes": [ { "children": [], "cpe_match": [ { "cpe23Uri": "cpe:2.3:a:rack_project:rack:*:*:*:*:*:*:*:*", "cpe_name": [], "versionEndExcluding": "2.1.4", "vulnerable": true }, { "cpe23Uri": "cpe:2.3:a:rack_project:rack:*:*:*:*:*:*:*:*", "cpe_name": [], "versionEndExcluding": "2.2.3", "versionStartIncluding": "2.2.0", "vulnerable": true } ], "operator": "OR" }, { "children": [], "cpe_match": [ { "cpe23Uri": "cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*", "cpe_name": [], "vulnerable": true }, { "cpe23Uri": "cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*", "cpe_name": [], "vulnerable": true } ], "operator": "OR" }, { "children": [], "cpe_match": [ { "cpe23Uri": "cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*", "cpe_name": [], "vulnerable": true } ], "operator": "OR" } ] }, "cve": { "CVE_data_meta": { "ASSIGNER": "cve-assignments@hackerone.com", "ID": "CVE-2020-8184" }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "en", "value": "A reliance on cookies without validation/integrity check security vulnerability exists in rack \u003c 2.2.3, rack \u003c 2.1.4 that makes it is possible for an attacker to forge a secure or host-only cookie prefix." } ] }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "en", "value": "CWE-20" } ] } ] }, "references": { "reference_data": [ { "name": "https://groups.google.com/g/rubyonrails-security/c/OWtmozPH9Ak", "refsource": "MISC", "tags": [ "Mailing List", "Patch", "Third Party Advisory" ], "url": "https://groups.google.com/g/rubyonrails-security/c/OWtmozPH9Ak" }, { "name": "https://hackerone.com/reports/895727", "refsource": "MISC", "tags": [ "Exploit", "Patch", "Third Party Advisory" ], "url": "https://hackerone.com/reports/895727" }, { "name": "[debian-lts-announce] 20200710 [SECURITY] [DLA 2275-1] ruby-rack security update", "refsource": "MLIST", "tags": [ "Mailing List", "Third Party Advisory" ], "url": "https://lists.debian.org/debian-lts-announce/2020/07/msg00006.html" }, { "name": "USN-4561-1", "refsource": "UBUNTU", "tags": [ "Third Party Advisory" ], "url": "https://usn.ubuntu.com/4561-1/" }, { "name": "[debian-lts-announce] 20230130 [SECURITY] [DLA 3298-1] ruby-rack security update", "refsource": "MLIST", "tags": [ "Mailing List", "Third Party Advisory" ], "url": "https://lists.debian.org/debian-lts-announce/2023/01/msg00038.html" } ] } }, "impact": { "baseMetricV2": { "acInsufInfo": false, "cvssV2": { "accessComplexity": "LOW", "accessVector": "NETWORK", "authentication": "NONE", "availabilityImpact": "NONE", "baseScore": 5.0, "confidentialityImpact": "NONE", "integrityImpact": "PARTIAL", "vectorString": "AV:N/AC:L/Au:N/C:N/I:P/A:N", "version": "2.0" }, "exploitabilityScore": 10.0, "impactScore": 2.9, "obtainAllPrivilege": false, "obtainOtherPrivilege": false, "obtainUserPrivilege": false, "severity": "MEDIUM", "userInteractionRequired": false }, "baseMetricV3": { "cvssV3": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "NONE", "baseScore": 7.5, "baseSeverity": "HIGH", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N", "version": "3.1" }, "exploitabilityScore": 3.9, "impactScore": 3.6 } }, "lastModifiedDate": "2023-02-16T19:24Z", "publishedDate": "2020-06-19T17:15Z" } } }
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.