Vulnerabilities in pkg:gem/websocket-extensions
PACKAGECVE-2020-7663 is a HIGH (CVSS 8.2) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Websocket extensions libraries in the RubyGems ecosystem. The issue involves regular expression denial of service in websocket-extensions (rubygem). Remediation is available by upgrading affected packages to version 0.1.5.
pkg:gem/websocket-extensions
Vulnerability advisories affecting package pkg:gem/websocket-extensions. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-g6wq-qcwm-j5g2 | CVE-2020-7663 | HIGH | Regular Expression Denial of Service in websocket-extensions (RubyGem) |
CVE-2020-7663 at a Glance
Security Impact
CVSS: 8.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H).
How to Fix CVE-2020-7663
To remediate this vulnerability, upgrade all affected Websocket extensions 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 websocket-extensions to 0.1.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for websocket-extensions
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-7663, inspect your project dependencies for Websocket extensions:
inspect dependencies for websocket-extensions
Analyze the terminal output to locate any version of Websocket extensions in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.5), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Websocket extensions, 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-2020-7663 Affected Websocket extensions Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
websocket-extensions
|
RubyGems |
< 0.1.5
|
0.1.5
|
References
Frequently Asked Questions
What is CVE-2020-7663?
Which Websocket extensions versions are affected?
What version fixes CVE-2020-7663?
Is websocket-extensions affected?
What is the CVSS score of CVE-2020-7663?
What CWE is associated with CVE-2020-7663?
How can I check RubyGems dependencies for CVE-2020-7663?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g6wq-qcwm-j5g2",
"modified" : "2023-05-16T16:17:54Z",
"published" : "2020-06-05T14:21:29Z",
"aliases" : [ "CVE-2020-7663" ],
"summary" : "Regular Expression Denial of Service in websocket-extensions (RubyGem)",
"details" : "### Impact\n\nThe ReDoS flaw allows an attacker to exhaust the server's capacity to process incoming requests by sending a WebSocket handshake request containing a header of the following form:\n\n Sec-WebSocket-Extensions: a; b=\"\\c\\c\\c\\c\\c\\c\\c\\c\\c\\c ...\n\nThat is, a header containing an unclosed string parameter value whose content is a repeating two-byte sequence of a backslash and some other character. The parser takes exponential time to reject this header as invalid, and this will block the processing of any other work on the same thread. Thus if you are running a single-threaded server, such a request can render your service completely unavailable.\n\n### Patches\n\nUsers should upgrade to version 0.1.5.\n\n### Workarounds\n\nThere are no known work-arounds other than disabling any public-facing WebSocket functionality you are operating.\n\n### References\n\n- https://blog.jcoglan.com/2020/06/02/redos-vulnerability-in-websocket-extensions/",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "websocket-extensions"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/faye/websocket-extensions-ruby/security/advisories/GHSA-g6wq-qcwm-j5g2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-7663"
}, {
"type" : "WEB",
"url" : "https://github.com/faye/websocket-extensions-ruby/commit/aa156a439da681361ed6f53f1a8131892418838b"
}, {
"type" : "WEB",
"url" : "https://blog.jcoglan.com/2020/06/02/redos-vulnerability-in-websocket-extensions"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/faye/websocket-extensions-ruby"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/websocket-extensions/CVE-2020-7663.yml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2020/08/msg00031.html"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-RUBY-WEBSOCKETEXTENSIONS-570830"
}, {
"type" : "WEB",
"url" : "https://usn.ubuntu.com/4502-1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-03T23:10:34Z",
"nvd_published_at" : "2020-06-02T19:15:00Z"
}
}