PT-2021-7337 · Ruby+10 · Date Gem+11

Svalkanov

·

Published

2021-11-15

·

Updated

2025-12-12

·

CVE-2021-41817

CVSS v2.0

7.8

High

VectorAV:N/AC:L/Au:N/C:N/I:N/A:C
Name of the Vulnerable Software and Affected Versions date gem versions prior to 3.2.1 date gem versions prior to 3.1.2 date gem versions prior to 3.0.2 date gem versions prior to 2.0.1
Description The issue is related to a ReDoS (regular expression Denial of Service) vulnerability in the date gem for Ruby, which can be exploited by using a long string. This can lead to a denial of service. The vulnerability is due to the use of regular expressions internally in the date parsing methods, including Date.parse. Applications and libraries that apply such methods to untrusted input may be affected.
Recommendations For date gem versions prior to 3.2.1, update to version 3.2.1 or later. For date gem versions prior to 3.1.2, update to version 3.1.2 or later. For date gem versions prior to 3.0.2, update to version 3.0.2 or later. For date gem versions prior to 2.0.1, update to version 2.0.1 or later. As a temporary workaround, consider using Date.strptime instead with a predefined date format, such as Date.strptime('2001-02-20', '%Y-%m-%d').

Exploit

Fix

DoS

Resource Exhaustion

Weakness Enumeration

Related Identifiers

ALSA-2022:0543
ALSA-2022:5779
ALSA-2022:6447
ALSA-2022:6450
ALSA-2022_0543
ALSA-2022_5779
ALSA-2022_6447
ALSA-2022_6450
ALSA-2025_16880
ALT-PU-2021-3482
ALT-PU-2023-4264
ALT-PU-2024-7811
AZL-7110
BDU:2022-05714
BIT-RUBY-2021-41817
BIT-RUBY-MIN-2021-41817
CESA-2022_0543
CESA-2022_5779
CESA-2022_6447
CESA-2022_6450
CVE-2021-41817
DLA-2853-1
DSA-5066-1
DSA-5067-1
ELSA-2022-0543
ELSA-2022-5779
ELSA-2022-6447
ELSA-2022-6450
GHSA-QG54-694P-WGPP
MGASA-2021-0579
OESA-2024-2581
OPENSUSE-SU-2022_1512-1
OPENSUSE-SU-2023_4176-1
OPENSUSE-SU-2024:11657-1
OPENSUSE-SU-2024:11658-1
OPENSUSE-SU-2024:11786-1
OPENSUSE-SU-2024:12712-1
OPENSUSE-SU-2024:13623-1
OPENSUSE-SU-2025:14621-1
OPENSUSE-SU-2025:15819-1
RHSA-2022:0543
RHSA-2022:0544
RHSA-2022:0581
RHSA-2022:0582
RHSA-2022:0708
RHSA-2022:5779
RHSA-2022:6447
RHSA-2022:6450
RHSA-2022:6855
RHSA-2022:6856
RHSA-2022_0543
RHSA-2022_5779
RHSA-2022_6447
RHSA-2022_6450
RLSA-2022:0543
RLSA-2022:5779
RLSA-2022:6447
RLSA-2022:6450
RLSA-2022_0543
RLSA-2022_5779
RLSA-2022_6447
RLSA-2022_6450
SUSE-SU-2022:1512-1
SUSE-SU-2022_1512-1
SUSE-SU-2023:4176-1
SUSE-SU-2023_4176-1
USN-5235-1

Affected Products

Alt Linux
Almalinux
Astra Linux
Centos
Linuxmint
Red Hat
Red Os
Rocky Linux
Ruby
Suse
Ubuntu
Date Gem