CVE-2021-41817
published 2022-01-01CVE-2021-41817: Date.parse in the date gem through 3.2.0 for Ruby allows ReDoS (regular expression Denial of Service) via a long string. The fixed versions are 3.2.1, 3.1.2…
PriorityP338high7.5CVSS 3.1
AVNACLPRNUINSUCNINAH
EPSS
3.22%
86.8th percentile
Date.parse in the date gem through 3.2.0 for Ruby allows ReDoS (regular expression Denial of Service) via a long string. The fixed versions are 3.2.1, 3.1.2, 3.0.2, and 2.0.1.
Affected
23 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| date_project | date | >= 0 < 2.0.1 | 2.0.1 |
| date_project | date | >= 3.0.0 < 3.0.2 | 3.0.2 |
| date_project | date | >= 3.1.0 < 3.1.2 | 3.1.2 |
| date_project | date | >= 3.2.0 < 3.2.1 | 3.2.1 |
| debian | debian_linux | — | — |
| debian | debian_linux | — | — |
| debian | debian_linux | — | — |
| debian | ruby2.7 | < ruby2.7 2.7.4-1+deb11u1 (bullseye) | ruby2.7 2.7.4-1+deb11u1 (bullseye) |
| fedoraproject | fedora | — | — |
| fedoraproject | fedora | — | — |
| msrc | cbl2_ruby_3.1.2-2_on_cbl_mariner_2.0 | — | — |
| opensuse | leap | — | — |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux | — | — |
| ruby-lang | date | < 2.0.1 | 2.0.1 |
| ruby-lang | date | — | — |
| ruby-lang | date | >= 3.0.0 < 3.0.2 | 3.0.2 |
| ruby-lang | date | >= 3.1.0 < 3.1.2 | 3.1.2 |
| ruby-lang | ruby | >= 2.6.0 < 2.6.9 | 2.6.9 |
| ruby-lang | ruby | >= 2.7.0 < 2.7.5 | 2.7.5 |
| ruby-lang | ruby | >= 3.0.0 < 3.0.3 | 3.0.3 |
| suse | linux_enterprise | — | — |
| suse | linux_enterprise | — | — |
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:N/I:N/A:P
osv9.8CRITICAL
vendor_ubuntu9.8CRITICAL
vendor_debian7.5HIGH
vendor_msrc7.5HIGH
vendor_redhat7.5HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Ubuntu
Ruby vulnerabilities
vendor_ubuntu·2022-01-18·CVSS 9.8
CVE-2021-41816 [CRITICAL] Ruby vulnerabilities
Title: Ruby vulnerabilities
Summary: Several security issues were fixed in Ruby.
It was discovered that Ruby incorrectly handled certain HTML files.
An attacker could possibly use this issue to cause a crash. This
issue only affected Ubuntu 20.04 LTS, Ubuntu 21.04, and Ubuntu 21.10.
(CVE-2021-41816)
It was discovered that Ruby incorrectly handled certain regular expressions.
An attacker could possibly use this issue to cause a regular expression
denial of service. (CVE-2021-41817)
It was discovered that Ruby incorrectly handled certain cookie names.
An attacker could possibly use this issue to access or expose
sensitive information. (CVE-2021-41819)
Instructions: In general, a standard system update will make all the necessary changes.
Microsoft
Date.parse in the date gem through 3.2.0 for Ruby allows ReDoS (regular expression Denial of Service) via a long string. The fixed versions are 3.2.1 3.1.2 3.0.2 and 2.0.1.
vendor_msrc·2022-01-11·CVSS 7.5
CVE-2021-41817 [HIGH] CWE-1333 Date.parse in the date gem through 3.2.0 for Ruby allows ReDoS (regular expression Denial of Service) via a long string. The fixed versions are 3.2.1 3.1.2 3.0.2 and 2.0.1.
Date.parse in the date gem through 3.2.0 for Ruby allows ReDoS (regular expression Denial of Service) via a long string. The fixed versions are 3.2.1 3.1.2 3.0.2 and 2.0.1.
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Marin
Red Hat
ruby: Regular expression denial of service vulnerability of Date parsing methods
vendor_redhat·2021-11-15·CVSS 7.5
CVE-2021-41817 [HIGH] CWE-400 ruby: Regular expression denial of service vulnerability of Date parsing methods
ruby: Regular expression denial of service vulnerability of Date parsing methods
Date.parse in the date gem through 3.2.0 for Ruby allows ReDoS (regular expression Denial of Service) via a long string. The fixed versions are 3.2.1, 3.1.2, 3.0.2, and 2.0.1.
A flaw was found in ruby, where the date object was found to be vulnerable to a regular expression denial of service (ReDoS) during the parsing of dates. This flaw allows an attacker to hang a ruby application by providing a specially crafted date string. The highest threat to this vulnerability is system availability.
Package: ruby (Red Hat Enterprise Linux 6) - Out of support scope
Package: ruby (Red Hat Enterprise Linux 7) - Will not fix
Package: ruby (Red Hat Enterprise Linux 9) - Not affected
Debian
CVE-2021-41817: ruby2.7 - Date.parse in the date gem through 3.2.0 for Ruby allows ReDoS (regular expressi...
vendor_debian·2021·CVSS 7.5
CVE-2021-41817 [HIGH] CVE-2021-41817: ruby2.7 - Date.parse in the date gem through 3.2.0 for Ruby allows ReDoS (regular expressi...
Date.parse in the date gem through 3.2.0 for Ruby allows ReDoS (regular expression Denial of Service) via a long string. The fixed versions are 3.2.1, 3.1.2, 3.0.2, and 2.0.1.
Scope: local
bullseye: resolved (fixed in 2.7.4-1+deb11u1)
OSV
ruby2.3, ruby2.5, ruby2.7 vulnerabilities
osv·2022-01-18·CVSS 9.8
CVE-2021-41816 [CRITICAL] ruby2.3, ruby2.5, ruby2.7 vulnerabilities
ruby2.3, ruby2.5, ruby2.7 vulnerabilities
It was discovered that Ruby incorrectly handled certain HTML files.
An attacker could possibly use this issue to cause a crash. This
issue only affected Ubuntu 20.04 LTS, Ubuntu 21.04, and Ubuntu 21.10.
(CVE-2021-41816)
It was discovered that Ruby incorrectly handled certain regular expressions.
An attacker could possibly use this issue to cause a regular expression
denial of service. (CVE-2021-41817)
It was discovered that Ruby incorrectly handled certain cookie names.
An attacker could possibly use this issue to access or expose
sensitive information. (CVE-2021-41819)
OSV
CVE-2021-41817: Date
osv·2022-01-01·CVSS 7.5
CVE-2021-41817 [HIGH] CVE-2021-41817: Date
Date.parse in the date gem through 3.2.0 for Ruby allows ReDoS (regular expression Denial of Service) via a long string. The fixed versions are 3.2.1, 3.1.2, 3.0.2, and 2.0.1.
OSV
Regular expression denial of service vulnerability (ReDoS) in date
osv·2021-11-16
CVE-2021-41817 [HIGH] Regular expression denial of service vulnerability (ReDoS) in date
Regular expression denial of service vulnerability (ReDoS) in date
Date’s parsing methods including Date.parse are using Regexps internally, some of which are vulnerable against regular expression denial of service. Applications and libraries that apply such methods to untrusted input may be affected.
The fix limits the input length up to 128 bytes by default instead of changing the regexps. This is because Date gem uses many Regexps and it is possible that there are still undiscovered vulnerable Regexps. For compatibility, it is allowed to remove the limitation by explicitly passing limit keywords as nil like Date.parse(str, limit: nil), but note that it may take a long time to parse.
Please update the date gem to version 3.2.1, 3.1.2, 3.0.2, and 2.0.1, or later. You can use gem update
GHSA
Regular expression denial of service vulnerability (ReDoS) in date
ghsa·2021-11-16
CVE-2021-41817 [HIGH] CWE-1333 Regular expression denial of service vulnerability (ReDoS) in date
Regular expression denial of service vulnerability (ReDoS) in date
Date’s parsing methods including Date.parse are using Regexps internally, some of which are vulnerable against regular expression denial of service. Applications and libraries that apply such methods to untrusted input may be affected.
The fix limits the input length up to 128 bytes by default instead of changing the regexps. This is because Date gem uses many Regexps and it is possible that there are still undiscovered vulnerable Regexps. For compatibility, it is allowed to remove the limitation by explicitly passing limit keywords as nil like Date.parse(str, limit: nil), but note that it may take a long time to parse.
Please update the date gem to version 3.2.1, 3.1.2, 3.0.2, and 2.0.1, or later. You can use gem update
No detection rules found.
No public exploits indexed.
https://hackerone.com/reports/1254844https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/https://security.gentoo.org/glsa/202401-27https://www.ruby-lang.org/en/news/2021/11/15/date-parsing-method-regexp-dos-cve-2021-41817/https://hackerone.com/reports/1254844https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/https://security.gentoo.org/glsa/202401-27https://www.ruby-lang.org/en/news/2021/11/15/date-parsing-method-regexp-dos-cve-2021-41817/
2022-01-01
Published