CVE-2021-22880
HIGH 7.5CVSS 3.1Active Record subject to Regular Expression Denial-of-Service (ReDoS)
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.
- Published
- 11 Feb 2021
- Last modified
- 17 Jun 2026
- Assigned by
- support@hackerone.com
- NVD status
- Modified
- Weakness
- CWE-400
- Also known as
- GHSA-8hc4-xxm3-5ppp
- Sources
- NVDJSONOSV GHSA-8hc4-xxm3-5pppJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | rubyonrails | railscpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* |
>= 4.2.0, < 5.2.4.5 | 5.2.4.5 |
| NVD | rubyonrails | railscpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* |
>= 6.0.0, < 6.0.3.5 | 6.0.3.5 |
| NVD | rubyonrails | railscpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* |
>= 6.1.0, < 6.1.2.1 | 6.1.2.1 |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:* |
= 32 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* |
= 33 | |
| OSV | RubyGems | activerecord | >= 5.0.0, < 5.2.4.5 | 5.2.4.5 |
| OSV | RubyGems | activerecord | >= 6.0.0, < 6.0.3.5 | 6.0.3.5 |
| OSV | RubyGems | activerecord | >= 6.1.0, < 6.1.2.1 | 6.1.2.1 |
References
- https://discuss.rubyonrails.org/t/cve-2021-22880-possible-dos-vulnerability-in-active-record-postgresql-adapter/77129 · Mitigation, Patch, Vendor Advisory, WEB
- https://hackerone.com/reports/1023899 · Exploit, Patch, Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MO5OJ3F4ZL3UXVLJO6ECANRVZBNRS2IH/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/
- https://security.netapp.com/advisory/ntap-20210805-0009/ · Third Party Advisory, WEB
- https://www.debian.org/security/2021/dsa-4929 · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-22880 · ADVISORY
- https://github.com/rails/rails · WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord/CVE-2021-22880.yml · WEB
- https://groups.google.com/g/rubyonrails-security/c/ZzUqCh9vyhI · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MO5OJ3F4ZL3UXVLJO6ECANRVZBNRS2IH · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3 · WEB
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 11 Feb 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 2 Mar 2021)