Skip to content
DoS Disclosed report Intermediate CVE-2021-3794

Inefficient Regular Expression Complexity in vuelidate

The url validator in the @vuelidate/validators package uses a regular expression that can be made to run very slowly by crafted input. An attacker who can supply input to the url() function could cause the application to use excessive CPU.

vuelidate/vuelidate

Originally disclosed on huntr

vuelidate is a simple, lightweight model-based validation for Vue.js 2.x & 3.0. A ReDoS (regular expression denial of service) flaw was found in the @vuelidate/validators package. An attacker that is able to provide crafted input to the url(input) function may cause an application to consume an excessive amount of CPU.

From the GitHub Advisory Database (GHSA-vvf2-ppj9-pp49, 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

Root cause

Likely the regular expression used by the url validator has inefficient complexity that allows catastrophic backtracking on certain inputs.

Impact

An attacker could cause the application to consume excessive CPU, potentially leading to a denial of service.

What the attacker needed

Attacker can supply input to url()

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 check text. Some patterns can become extremely slow when given specially crafted input, which is called a ReDoS (regular expression denial of service). Here, the url validator has such a pattern, so an attacker could send input that makes the application work very hard and slow down.

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.