NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
💎
💎 RubyGems
Not in CISA KEV
HIGH severity

CVE-2021-22880 — activerecord

HIGH

CVE-2021-22880 is a high-severity (CVSS 7.5) Uncontrolled Resource Consumption vulnerability in activerecord. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for activerecord — see the affected versions and patch details below.

Active Record subject to Regular Expression Denial-of-Service (ReDoS)

Also known asGHSA-8hc4-xxm3-5ppp
Published
Updated
Affected
3 pkgs
Patched
3 / 3
Exploits
1 known
Exploitation data as of Oct 31, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
4.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs91th percentile — riskier than 91% of all scored CVEsHighest risk
2.05%3.03%4.01%4.98%2.6%4.4%May 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

3 pkgs affected
💎activerecord💎activerecord💎activerecord

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.

Description

The PostgreSQL adapter in Active Record before 6.1.2.1, 6.0.3.5, 5.2.4.5 suffers from a regular expression denial of service (REDoS) vulnerability. Carefully crafted input can cause the input validation in the money type of the PostgreSQL adapter in Active Record to spend too much time in a regular expression, resulting in the potential for a DoS attack. This only impacts Rails applications that are using PostgreSQL along with money type columns that take user input.

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
💎RubyGemsactiverecord≥ 5.0.0&&< 5.2.4.55.2.4.5bundle update activerecord --conservative
💎RubyGemsactiverecord≥ 6.0.0&&< 6.0.3.56.0.3.5bundle update activerecord --conservative
💎RubyGemsactiverecord≥ 6.1.0&&< 6.1.2.16.1.2.1bundle update activerecord --conservative

Affected Products

2 products · 5 configurations
OS
fedorafedoraproject
2 versions
3233
Application
railsrubyonrails
≥ 6.1.0 && < 6.1.2.1
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for activerecord, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update activerecord to 5.2.4.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-22880 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Frequently Asked Questions

The PostgreSQL adapter in Active Record before 6.1.2.1, 6.0.3.5, 5.2.4.5 suffers from a regular expression denial of service (REDoS) vulnerability. Carefully crafted input can cause the input validation in the `money` type of the PostgreSQL adapter in Active Record to spend too much time in a regular expression, resulting in the potential for a DoS attack. This only impacts Rails applications that are using PostgreSQL along with money type columns that take user input.
O3 Security · Impact-Aware SCA

Is CVE-2021-22880 in your dependencies?

Find it across RubyGems, including transitive dependencies.

CVE-2021-22880: activerecord DoS — Fixed in 5.2.4.5