CVE-2021-22880
JSON

7.5high

Active Record subject to Regular Expression Denial-of-Service (ReDoS)

Severity
7.5high CVSS:3.1 by NVD
Exploit likelihood
4.49% (higher than 91% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
hackerone
Also known as
GHSA-8hc4-xxm3-5ppp

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

Product or packageVersionsReported by
https://github.com/rails/railsFixed in 6.1.2.1, 6.0.3.5, 5.2.4.5CVE List
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.1GitHub Advisory Database
rubyonrails railsfrom 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.1NVD
fedoraproject fedora32, 33NVD

All scores

GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:N/A:P

Classification

What each source says

CVE List

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.

NVD (es)

El adaptador PostgreSQL en Active Record versiones anteriores a 6.1.2.1, 6.0.3.5, 5.2.4.5, sufre una vulnerabilidad de denegación de servicio de expresión regular (REDoS). Una entrada cuidadosamente diseñada puede causar que la comprobación de la entrada en el tipo "money" del adaptador de PostgreSQL en Active Record pase demasiado tiempo en una expresión regular, resultando en la posibilidad de un ataque DoS. Esto solo afecta a las aplicaciones Rails que usan PostgreSQL junto con las columnas de tipo money que toman la entrada del usuario

References

https://hackerone.com/reports/1023899exploit, patch, third-party-advisory, web
https://discuss.rubyonrails.org/t/cve-2021-22880-possible-dos-vulnerability-in-active-record-postgresql-adapter/77129mitigation, 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-4929third-party-advisory, vendor-advisory, web
https://security.netapp.com/advisory/ntap-20210805-0009/third-party-advisory
https://nvd.nist.gov/vuln/detail/CVE-2021-22880advisory
https://github.com/rails/railsweb
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord/CVE-2021-22880.ymlweb
https://groups.google.com/g/rubyonrails-security/c/ZzUqCh9vyhIweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MO5OJ3F4ZL3UXVLJO6ECANRVZBNRS2IHweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3web

Sources

SourceRecordLicence
CVE ListCVE-2021-22880 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-8hc4-xxm3-5ppp changed 2024-02-20CC-BY-4.0
NVDCVE-2021-22880 changed 2026-06-17Public domain