CVE-2021-43306: Regular expression denial of service in jquery-validation

jquery-validation Updated 02 Oct 2025

Summary

03/06/2022
Yes i
Low
Not published

CVE-2021-43306: Regular expression denial of service in jquery-validation. Affects jquery-validation versions < 1.19.4. Fixed in 1.19.4. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The jquery-validation package is a popular npm package used for client-side form validation. It provides a set of validation rules and error messages to ensure that user input meets specified criteria. The package is widely used in web applications to validate form inputs before submitting them to the server. However, a vulnerability has been discovered in the package that allows an attacker to trigger a regular expression denial of service (ReDoS) attack. This can lead to a significant degradation in performance or even a complete denial of service if the attacker is able to supply malicious input to the url2 method.

Vulnerability Detail

The vulnerability in the jquery-validation package is due to an exponential ReDoS attack that can be triggered when processing certain input patterns. An attacker can exploit this vulnerability by providing specially crafted input that causes the regular expression engine to spend an excessive amount of time matching the input. This can result in a denial of service condition where the application becomes unresponsive or slows down significantly. The impact of this vulnerability is considered low, but it can still be exploited by an attacker to disrupt the normal operation of an application.

How To Fix

Minimum fixed version

1.19.4

This is the first release that contains the fix.

npm install jquery-validation@1.19.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version of the jquery-validation package is not immediately feasible, a temporary workaround can be implemented to mitigate the risk of exploitation. One possible workaround is to implement input validation on the server-side as well, in addition to the client-side validation provided by the package. This can help prevent malicious input from reaching the vulnerable code and triggering the ReDoS attack. However, it is important to note that this workaround does not address the root cause of the vulnerability and should be considered a temporary solution until the package can be updated.

Conclusion

In conclusion, the jquery-validation package is vulnerable to a regular expression denial of service (ReDoS) attack. This vulnerability can be mitigated by upgrading to version 1.19.4 or later of the package. In the meantime, implementing server-side input validation can serve as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for jquery-validation →

Share this vulnerability

FAQ

The impact of this vulnerability is considered low, but it can still be exploited by an attacker to disrupt the normal operation of an application. It can lead to a significant degradation in performance or even a complete denial of service if the attacker is able to supply malicious input to the url2 method.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and the tool will analyze it for any known vulnerabilities, including CVE-2021-43306.

Yes, a fix is available for this vulnerability. It is recommended to upgrade to version 1.19.4 or later of the jquery-validation package to mitigate the risk of exploitation. This version includes a fix for the ReDoS vulnerability.

Yes, if upgrading to the latest version of the jquery-validation package is not immediately feasible, you can implement a temporary workaround. One possible workaround is to implement input validation on the server-side as well, in addition to the client-side validation provided by the package. This can help prevent malicious input from reaching the vulnerable code and triggering the ReDoS attack.

You can find more information about this vulnerability in the GitHub Advisory Database. The advisory for this vulnerability can be accessed at: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-j9m2-h2pv-wvph/GHSA-j9m2-h2pv-wvph.json

Related vulnerabilities

Recent vulnerabilities recorded for jquery-validation.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

1.19.4

This is the first release that contains the fix.

npm install jquery-validation@1.19.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback