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.
The product does not properly control the allocation and maintenance of a limited resource.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Rails | Rubyonrails | 4.2.0 (including) | 5.2.4.5 (excluding) |
Rails | Rubyonrails | 6.0.0 (including) | 6.0.3.5 (excluding) |
Rails | Rubyonrails | 6.1.0 (including) | 6.1.2.1 (excluding) |
Rails | Ubuntu | bionic | * |
Rails | Ubuntu | focal | * |
Rails | Ubuntu | groovy | * |
Rails | Ubuntu | hirsute | * |
Rails | Ubuntu | impish | * |
Rails | Ubuntu | kinetic | * |
Rails | Ubuntu | lunar | * |
Rails | Ubuntu | mantic | * |
Rails | Ubuntu | oracular | * |
Rails | Ubuntu | trusty | * |
Rails | Ubuntu | xenial | * |
Rails-4.0 | Ubuntu | trusty | * |
Ruby-actionpack-3.2 | Ubuntu | trusty | * |
Ruby-activemodel-3.2 | Ubuntu | trusty | * |
Ruby-activerecord-3.2 | Ubuntu | trusty | * |
Ruby-activesupport-3.2 | Ubuntu | trusty | * |
Ruby-rails-3.2 | Ubuntu | trusty | * |
Mitigation of resource exhaustion attacks requires that the target system either:
The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question.
The second solution is simply difficult to effectively institute – and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.