GHSL-2022-023: Regular Expression Denial of Service (ReDoS) in Apache Ignite
Apache Ignite's JDBC driver uses a regular expression with nested repetition to translate SQL wildcards, which can cause catastrophic backtracking when processing a crafted table name. An attacker could exploit this to cause a denial of service by consuming excessive CPU resources.
Originally disclosed on GitHub Security Lab
Apache Ignite up to version 2.12.0 is vulnerable to Regular Expression Denial of Service (ReDoS) in the way it handles table names when requesting primary keys through its JDBC driver. Specially crafted table names may cause catastrophic backtracking, taking exponential time to complete.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The regular expression used to convert SQL wildcards contains nested repetition, leading to catastrophic backtracking on crafted input.
Impact
This issue may lead to a denial of service of the application using Apache Ignite by resource consumption.
What the attacker needed
Ignite server running; JDK 8 or earlier; Ability to send JDBC metadata request
How it was found
- Start an Ignite server and connect a client using the JDBC driver.
- Create a cache with a query entity to enable metadata queries.
- Call DatabaseMetaData.getPrimaryKeys with a specially crafted table name containing many backslashes.
- Observe the application hang due to excessive backtracking.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A regular expression is a pattern used to match text. Some patterns can become extremely slow when given certain inputs, a problem called ReDoS. Here, a specially crafted table name makes the pattern take exponential time, effectively freezing the application.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.