CVE-2021-41817 Regular expression denial of service vulnerability (ReDoS) in date

High 7.5 Published Updated

Attackers can cause denial of service in Ruby applications using the date gem by submitting long strings to Date.parse.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-41817?

CVE-2021-41817 is a high-severity denial of service vulnerability in Debian Debian Linux, published on 1 Jan 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-1333

Which versions are affected by CVE-2021-41817?

10 open source packages ship an affected version, including date, ruby and ruby-min. It affects 9 products.

PackageAffectedFixed in
date RubyGemsAll versions2.0.1
date RubyGemsAll versions2.0.1
date RubyGemsFrom 3.0.03.0.2
date RubyGemsFrom 3.0.03.0.2
date RubyGemsFrom 3.1.03.1.2
date RubyGemsFrom 3.1.03.1.2
4 more packages
date RubyGemsFrom 3.2.03.2.1
date RubyGemsFrom 3.2.03.2.1
ruby BitnamiFrom 2.6.02.6.9, 2.7.5, 3.0.3
ruby-min BitnamiFrom 2.6.02.6.9, 2.7.5, 3.0.3

Products include Debian Debian Linux, Fedoraproject Fedora, Opensuse Factory, Opensuse Leap, Redhat Enterprise Linux, Redhat Software Collections and 3 more.

How do I fix CVE-2021-41817?

Upgrade date to a fixed version for your release line: 2.0.1, 3.0.2, 3.1.2 or 3.2.1.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2021-41817 being exploited?

There is no known exploitation of CVE-2021-41817 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2021-41817, AZL-7110, BIT-ruby-2021-41817, BIT-ruby-min-2021-41817, CLEANSTART-2026-KK38106, DEBIAN-CVE-2021-41817 and 4 more.

Is CVE-2021-41817 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free