CVE-2025-3573: jquery-validation Cross-site Scripting Vulnerability

jquery-validation Updated 02 Oct 2025

Summary

15/04/2025
Yes i
Moderate
6.1

CVE-2025-3573: jquery-validation vulnerable to Cross-site Scripting. Affects jquery-validation versions < 1.20.0. Fixed in 1.20.0. How to fix ↓

Also tracked for

The same CVE-2025-3573 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

jquery-validation is a popular JavaScript library used for client-side form validation. It allows developers to enforce rules on form inputs, providing user-friendly error messages and enhancing the overall user experience. However, certain versions of this package are susceptible to a Cross-site Scripting (XSS) vulnerability, which can be exploited if user-controlled input is not properly sanitized.

Vulnerability Detail

The vulnerability arises from the showLabel() function in jquery-validation, which can accept a user-controlled placeholder value. If this value is not adequately sanitized, it can lead to XSS attacks, allowing malicious users to inject scripts into web pages viewed by other users. This can result in unauthorized actions being performed on behalf of users, data theft, or other malicious activities.

How To Fix

Latest published version: 1.22.1 as of 23 Oct 2026

npm install jquery-validation@1.22.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.20.0

This is the first release that contains the fix.

npm install jquery-validation@1.20.0

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

Workaround

If you cannot update the package immediately, consider sanitizing user inputs before they are passed to the showLabel() function. This can be done using a library like DOMPurify to clean the input. Example code:

const cleanInput = DOMPurify.sanitize(userInput);
showLabel(cleanInput);

Conclusion

The jquery-validation package has a vulnerability that can lead to Cross-site Scripting attacks if not addressed. It is crucial to update to version 1.20.0 or later to protect your application from potential exploits. Additionally, consider implementing input sanitization as a temporary measure.

See every vulnerability recorded for jquery-validation →

Share this vulnerability

FAQ

XSS is a security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users, potentially leading to data theft or unauthorized actions.

Versions of jquery-validation before 1.20.0 are vulnerable to this XSS issue.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score of this vulnerability is 6.1, indicating a moderate severity level.

If an immediate update is not possible, ensure to sanitize user inputs to mitigate the risk of XSS attacks.

Related vulnerabilities

Recent vulnerabilities recorded for jquery-validation.

How To Fix

Latest published version: 1.22.1 as of 23 Oct 2026

npm install jquery-validation@1.22.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.20.0

This is the first release that contains the fix.

npm install jquery-validation@1.20.0

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