regex is an implementation of regular expressions for the Rust language. The regex crate features built-in mitigations to prevent denial of service attacks caused by untrusted regexes, or untrusted input matched by trusted regexes. Those (tunable) mitigations already provide sane defaults to prevent attacks. This guarantee is documented and its considered part of the crates API. Unfortunately a bug was discovered in the mitigations designed to prevent untrusted regexes to take an arbitrary amount of time during parsing, and its possible to craft regexes that bypass such mitigations. This makes it possible to perform denial of service attacks by sending specially crafted regexes to services accepting user-controlled, untrusted regexes. All versions of the regex crate before or equal to 1.5.4 are affected by this issue. The fix is include starting from regex 1.5.5. All users accepting user-controlled regexes are recommended to upgrade immediately to the latest version of the regex crate. Unfortunately there is no fixed set of problematic regexes, as there are practically infinite regexes that could be crafted to exploit this vulnerability. Because of this, it us not recommend to deny known problematic regexes.
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Regex | Rust-lang | * | 1.5.5 (excluding) |
Red Hat Enterprise Linux 7 | RedHat | firefox-0:91.8.0-1.el7_9 | * |
Red Hat Enterprise Linux 7 | RedHat | thunderbird-0:91.8.0-1.el7_9 | * |
Red Hat Enterprise Linux 8 | RedHat | firefox-0:91.8.0-1.el8_5 | * |
Red Hat Enterprise Linux 8 | RedHat | thunderbird-0:91.8.0-1.el8_5 | * |
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions | RedHat | firefox-0:91.8.0-1.el8_1 | * |
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions | RedHat | thunderbird-0:91.8.0-1.el8_1 | * |
Red Hat Enterprise Linux 8.2 Extended Update Support | RedHat | firefox-0:91.8.0-1.el8_2 | * |
Red Hat Enterprise Linux 8.2 Extended Update Support | RedHat | thunderbird-0:91.8.0-1.el8_2 | * |
Red Hat Enterprise Linux 8.4 Extended Update Support | RedHat | firefox-0:91.8.0-1.el8_4 | * |
Red Hat Enterprise Linux 8.4 Extended Update Support | RedHat | thunderbird-0:91.8.0-1.el8_4 | * |
Firefox | Ubuntu | bionic | * |
Firefox | Ubuntu | devel | * |
Firefox | Ubuntu | focal | * |
Firefox | Ubuntu | impish | * |
Firefox | Ubuntu | jammy | * |
Firefox | Ubuntu | kinetic | * |
Firefox | Ubuntu | lunar | * |
Firefox | Ubuntu | trusty | * |
Firefox | Ubuntu | upstream | * |
Firefox | Ubuntu | xenial | * |
Rust-regex | Ubuntu | focal | * |
Rust-regex | Ubuntu | impish | * |
Rust-regex | Ubuntu | jammy | * |
Rust-regex | Ubuntu | kinetic | * |
Rust-regex | Ubuntu | trusty | * |
Rust-regex | Ubuntu | upstream | * |
Rust-regex | Ubuntu | xenial | * |
Thunderbird | Ubuntu | bionic | * |
Thunderbird | Ubuntu | focal | * |
Thunderbird | Ubuntu | impish | * |
Thunderbird | Ubuntu | upstream | * |
Limited resources include memory, file system storage, database connection pool entries, and CPU. If an attacker can trigger the allocation of these limited resources, but the number or size of the resources is not controlled, then the attacker could cause a denial of service that consumes all available resources. This would prevent valid users from accessing the product, and it could potentially have an impact on the surrounding environment. For example, a memory exhaustion attack against an application could slow down the application as well as its host operating system. There are at least three distinct scenarios which can commonly lead to resource exhaustion:
Resource exhaustion problems are often result due to an incorrect implementation of the following situations:
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.