CVE-2021-3794: Inefficient Regular Expression Complexity in vuelidate
7.5
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.51056%
CWE
Published
9/20/2021
Updated
1/30/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
@vuelidate/validators | npm | <= 2.0.0-alpha.21 | 2.0.0-alpha.22 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the insecure regular expression in the url validator. The commit diff shows a fundamental rewrite of the regex pattern in url.js
, specifically replacing a vulnerable custom regex with a known safer pattern from dperini/729294. The original regex had multiple nested quantifiers and ambiguous patterns that could cause exponential time complexity with certain malicious inputs. The tests in url.spec.js
were updated to handle domain endings with trailing dots, but the core vulnerability was in the regex implementation within the url validator
function itself.