CVE-2021-22880Rubyonrails Rails
High 7.5 No auth needed
Follow: this CVE · Rubyonrails · Rubyonrails Rails We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 4.5% probability of exploitation in 30 days · percentile 92
- Auth required
- No
- Published
- Feb 11, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-400
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
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.
What to do
- Apply the vendor's security update for Rails.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| RubyGems | activerecord |
≥ 5.0.0 < 5.2.4.5 |
5.2.4.5 |
gem "activerecord", ">= 5.2.4.5" |
| RubyGems | activerecord |
≥ 6.0.0 < 6.0.3.5 |
6.0.3.5 |
gem "activerecord", ">= 6.0.3.5" |
| RubyGems | activerecord |
≥ 6.1.0 < 6.1.2.1 |
6.1.2.1 |
gem "activerecord", ">= 6.1.2.1" |
Per OSV / GitHub Advisories (GHSA-8hc4-xxm3-5ppp). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| rubyonrails | rails | ≥ 4.2.0 < 5.2.4.5 |
| rubyonrails | rails | ≥ 6.0.0 < 6.0.3.5 |
| rubyonrails | rails | ≥ 6.1.0 < 6.1.2.1 |
| fedoraproject | fedora | 32 |
| fedoraproject | fedora | 33 |
Official sources
References
Links published by the sources. Open them with care.
- discuss.rubyonrails.org Mitigation Patch Vendor Advisory
- hackerone.com Exploit Patch Third Party Advisory
- lists.fedoraproject.org
- lists.fedoraproject.org
- security.netapp.com Third Party Advisory
- www.debian.org Third Party Advisory