Skip to content
DoS Disclosed report Intermediate CVE-2022-35923

v8n vulnerable to Inefficient Regular Expression Complexity

The lowercase() and uppercase() validation rules in v8n use regular expressions with inefficient complexity, allowing a short crafted string to cause excessive backtracking. An attacker could supply such a string to cause a denial of service by making the validation take tens of seconds.

imbrn/v8n

Originally disclosed on huntr

Impact

Inefficient regular expression complexity of lowercase() and uppercase() regex could lead to a denial of service attack. With a formed payload 'a' + 'a'.repeat(i) + 'A', only 32 characters payload could take 29443 ms time execution when testing lowercase(). The same issue happens with uppercase().

Patches

v1.5.1

References

huntr.dev report Regular Expression Denial of Service (ReDoS) and Catastrophic Backtracking

For more information

If you have any questions or comments about this advisory:

From the GitHub Advisory Database (GHSA-xrx9-gj26-5wx9, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

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

Impact

An attacker could cause a denial of service by submitting a short crafted string that makes the validation take tens of seconds, potentially exhausting server resources.

What the attacker needed

Ability to submit input to a v8n validation rule

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.

Some text-checking patterns (regular expressions) can get stuck trying many combinations when given a specially crafted input, like a long run of the same letter followed by a different one. This makes the program take a very long time to finish, which can stop it from serving other users. Here, a short string of only 32 characters could make a check take almost 30 seconds.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.