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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | https://github.com/rails/rails | Fixed in 6.1.2.1, 6.0.3.5, 5.2.4.5 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | rails | 2:6.0.3.5+dfsg-1 | — |
| Debian 13 | rails | 2:6.0.3.5+dfsg-1 | — |
| Debian 12 | rails | 2:6.0.3.5+dfsg-1 | — |
| Debian 10 | rails | 2:5.2.2.1+dfsg-1+deb10u3 | DSA-4929-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | rails | No fix yet | — |
| Ubuntu 26.04 LTS | rails | No fix yet | — |
| Ubuntu 25.10 | rails | No fix yet | — |
| Ubuntu 24.04 LTS | rails | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 22.04 LTS | rails | No fix yet | — |
| Ubuntu Pro 20.04 LTS | rails | No fix yet | — |
| Ubuntu Pro 18.04 LTS | rails | No fix yet | — |
| Ubuntu Pro 16.04 LTS | rails | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP3 | rubygem-activerecord-5_1 | 5.1.4-5.3.3 | SUSE-SU-2021:3634-1 |
| SLES 15 SP2 | rubygem-activerecord-5_1 | 5.1.4-5.3.3 | SUSE-SU-2021:3634-1 |
| SLES 15 SP1 | rubygem-activerecord-5_1 | 5.1.4-5.3.3 | SUSE-SU-2021:3634-1 |
| SLES 15 | rubygem-activerecord-5_1 | 5.1.4-5.3.3 | SUSE-SU-2021:3634-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE OpenStack Cloud Crowbar 9 | rubygem-activerecord-4_2 | 4.2.9-6.6.1 | SUSE-SU-2021:3267-1 |
| SUSE OpenStack Cloud Crowbar 8 | rubygem-activerecord-4_2 | 4.2.9-6.6.1 | SUSE-SU-2021:3267-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | rubygem-activerecord-6.0 | 6.0.4.4-1.1 | openSUSE-SU-2024:11826-1 |
| openSUSE Leap 15.3 | rubygem-activerecord-5_1 | 5.1.4-5.3.3 | openSUSE-SU-2021:3634-1 |
| openSUSE Leap 15.2 | rubygem-activerecord-5_1 | 5.1.4-lp152.4.3.1 | openSUSE-SU-2021:1468-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 1 repository
-
halkichi0308/CVE-2021-22880 ★ 1 · Oct 30, 2023
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | activerecord | >= 5.0.0, < 5.2.4.5 | 5.2.4.5 | GHSA-8hc4-xxm3-5ppp |
| RubyGems | activerecord | >= 6.0.0, < 6.0.3.5 | 6.0.3.5 | GHSA-8hc4-xxm3-5ppp |
| RubyGems | activerecord | >= 6.1.0, < 6.1.2.1 | 6.1.2.1 | GHSA-8hc4-xxm3-5ppp |
Advisories 6
- DSA-4929-1 rails - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:11826-1 ruby3.1-rubygem-activerecord-6.0-6.0.4.4-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2021:3267-1 Security update for rubygem-activerecord-4_2 SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2021:3634-1 Security update for rubygem-activerecord-5_1 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2021:3634-1 Security update for rubygem-activerecord-5_1 SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2021:1468-1 Security update for rubygem-activerecord-5_1 SUSE / openSUSE Security Updates · Feb 4, 2026
References
- https://hackerone.com/reports/1023899
- https://discuss.rubyonrails.org/t/cve-2021-22880-possible-dos-vulnerability-in-active-record-postgresql-adapter/77129
- FEDORA-2021-b571fca1b8 vendor-advisory
- FEDORA-2021-def0e32233 vendor-advisory
- DSA-4929 vendor-advisory
- https://security.netapp.com/advisory/ntap-20210805-0009/