Vulnerability · Published Feb 11, 2021 · Assigned by hackerone
CVE-2021-22880
High 7.5
In plain English
A high-severity uncontrolled resource consumption in https://github.com/rails/rails. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 4.5% (higher than 92% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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 & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | rails | 2:6.0.3.5+dfsg-1 | DEBIAN-CVE-2021-22880 |
| Debian:13 | rails | 2:6.0.3.5+dfsg-1 | DEBIAN-CVE-2021-22880 |
| Debian:14 | rails | 2:6.0.3.5+dfsg-1 | DEBIAN-CVE-2021-22880 |
| RubyGems | activerecord | 5.2.4.5 | GHSA-8hc4-xxm3-5ppp |
| RubyGems | activerecord | 6.0.3.5 | GHSA-8hc4-xxm3-5ppp |
| RubyGems | activerecord | 6.1.2.1 | GHSA-8hc4-xxm3-5ppp |
| Ubuntu:24.04:LTS | rails | no fix listed | UBUNTU-CVE-2021-22880 |
| Ubuntu:25.10 | rails | no fix listed | UBUNTU-CVE-2021-22880 |
| Ubuntu:26.04:LTS | rails | no fix listed | UBUNTU-CVE-2021-22880 |
| Ubuntu:26.10 | rails | no fix listed | UBUNTU-CVE-2021-22880 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | https://github.com/rails/rails | Fixed in 6.1.2.1, 6.0.3.5, 5.2.4.5 |
Weakness: CWE-400
References
- https://hackerone.com/reports/1023899 x_refsource_MISC
- https://discuss.rubyonrails.org/t/cve-2021-22880-possible-dos-vulnerability-in-active-record-postgresql-adapter/77129 x_refsource_MISC
- FEDORA-2021-b571fca1b8 vendor-advisory, x_refsource_FEDORA
- FEDORA-2021-def0e32233 vendor-advisory, x_refsource_FEDORA
- DSA-4929 vendor-advisory, x_refsource_DEBIAN
- https://security.netapp.com/advisory/ntap-20210805-0009/ x_refsource_CONFIRM