# CVE-2021-22880: Active Record subject to Regular Expression Denial-of-Service (ReDoS)

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 4.49%, higher than 91% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-02-11T16:11:22.000Z
- Modified: 2026-06-17T03:37:56.260Z
- Also known as: GHSA-8hc4-xxm3-5ppp
- Weaknesses: CWE-400
- Assigned by: hackerone

## 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.

(As written by CVE List.)

## Affected

- https://github.com/rails/rails: Fixed in 6.1.2.1, 6.0.3.5, 5.2.4.5
- activerecord (RubyGems): from 5.0.0 before 5.2.4.5; from 6.0.0 before 6.0.3.5; from 6.1.0 before 6.1.2.1
- rubyonrails rails: from 4.2.0 before 5.2.4.5; from 6.0.0 before 6.0.3.5; from 6.1.0 before 6.1.2.1
- fedoraproject fedora: 32; 33

## Every score

- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://hackerone.com/reports/1023899> (exploit, patch, third-party-advisory, web)
- <https://discuss.rubyonrails.org/t/cve-2021-22880-possible-dos-vulnerability-in-active-record-postgresql-adapter/77129> (mitigation, patch, vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MO5OJ3F4ZL3UXVLJO6ECANRVZBNRS2IH/> (vendor-advisory)
- <https://www.debian.org/security/2021/dsa-4929> (third-party-advisory, vendor-advisory, web)
- <https://security.netapp.com/advisory/ntap-20210805-0009/> (third-party-advisory)
- <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)
- <https://security.netapp.com/advisory/ntap-20210805-0009> (web)

## Sources

- CVE List: [CVE-2021-22880](https://www.cve.org/CVERecord?id=CVE-2021-22880), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-8hc4-xxm3-5ppp](https://github.com/advisories/GHSA-8hc4-xxm3-5ppp), CC-BY-4.0, modified 2024-02-20
- NVD: [CVE-2021-22880](https://nvd.nist.gov/vuln/detail/CVE-2021-22880), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-22880 · Whole record: https://cve.day/CVE-2021-22880.json · Rebuilt by cve.day 2026-11-25T22:57:59.906Z
