CVE-2021-41183: XSS in jquery-ui Datepicker Widget

jquery-ui Updated 02 Oct 2025

Summary

26/10/2021
Yes i
Moderate
6.5

CVE-2021-41183: XSS in *Text options of the Datepicker widget in jquery-ui. Affects jquery-ui versions < 1.13.0. Fixed in 1.13.0. How to fix ↓

Also tracked for

The same CVE-2021-41183 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The jquery-ui package is a popular JavaScript library that provides a set of user interface components and interactions. It includes the Datepicker widget, which allows users to select dates from a calendar. The package is widely used in web applications to enhance the user experience. However, a vulnerability in the Datepicker widget allows for cross-site scripting (XSS) attacks when untrusted sources are used to set certain text options.

Vulnerability Detail

The vulnerability arises when the values of various *Text options of the Datepicker widget are accepted from untrusted sources. This can lead to the execution of untrusted code. For example, if the Datepicker is initialized with options that include malicious scripts in the closeText, currentText, prevText, nextText, buttonText, or appendText properties, the doEvilThing function will be called with the provided script as a parameter. This can result in arbitrary code execution in the context of the vulnerable application. The impact of this vulnerability can range from unauthorized data access to full control of the affected application.

How To Fix

Minimum fixed version

1.13.0

This is the first release that contains the fix.

npm install jquery-ui@1.13.0

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

Workaround

If updating to the latest version is not immediately feasible, a workaround is to avoid accepting the values of the *Text options from untrusted sources. Instead, developers should ensure that these values are hardcoded or come from trusted sources.

Conclusion

The XSS vulnerability in the jquery-ui Datepicker widget can have serious security implications for web applications. It is crucial to update to the latest version of the jquery-ui package (1.13.0 or later) to mitigate this vulnerability. If immediate updating is not possible, developers should ensure that untrusted values are not accepted for the *Text options. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for jquery-ui →

Share this vulnerability

FAQ

The vulnerability allows for cross-site scripting (XSS) attacks, which can lead to unauthorized data access or full control of the affected application.

To fix the vulnerability, update the jquery-ui package to version 1.13.0 or later.

Yes, if updating to the latest version is not immediately feasible, developers can avoid accepting untrusted values for the *Text options.

There are no known public exploits for this vulnerability at the moment.

For more information, you can search for a relevant issue in the jQuery UI repository on GitHub. If you don't find an answer, you can open a new issue.

Related vulnerabilities

Recent vulnerabilities recorded for jquery-ui.

How To Fix

Minimum fixed version

1.13.0

This is the first release that contains the fix.

npm install jquery-ui@1.13.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