Skip to main content

CVE-2021-41183 — XSS in jquery-ui-rails — CVE Details

MEDIUM

XSS in `*Text` options of the Datepicker widget in jquery-ui

Published October 26, 2021Updated July 8, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (8.53%). Schedule for your next planned update.

Does your project use an affected jquery-ui-rails version?

Paste your Gemfile.lock to check it for CVE-2021-41183 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Gemfile.lock

Summary

Impact

Accepting the value of various *Text options of the Datepicker widget from untrusted sources may execute untrusted code. For example, initializing the datepicker in the following way:

$( "#datepicker" ).datepicker( {
	showButtonPanel: true,
	showOn: "both",
	closeText: "<script>doEvilThing( 'closeText XSS' )</script>",
	currentText: "<script>doEvilThing( 'currentText XSS' )</script>",
	prevText: "<script>doEvilThing( 'prevText XSS' )</script>",
	nextText: "<script>doEvilThing( 'nextText XSS' )</script>",
	buttonText: "<script>doEvilThing( 'buttonText XSS' )</script>",
	appendText: "<script>doEvilThing( 'appendText XSS' )</script>",
} );

will call doEvilThing with 6 different parameters coming from all *Text options.

Patches

The issue is fixed in jQuery UI 1.13.0. The values passed to various *Text options are now always treated as pure text, not HTML.

Workarounds

A workaround is to not accept the value of the *Text options from untrusted sources.

For more information

If you have any questions or comments about this advisory, search for a relevant issue in the jQuery UI repo. If you don't find an answer, open a new issue.

Advisory Timeline

  • First published October 26, 2021 (1857 days ago).
  • Last revised July 8, 2026 — 1716 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update jquery-ui-rails to 7.0.0 or later
gem install jquery-ui-rails -v 7.0.0
NuGet
Update jQuery.UI.Combined to 1.13.0 or later
dotnet add package jQuery.UI.Combined --version 1.13.0
Maven
Update org.webjars.npm:jquery-ui to 1.13.0 or later
<!-- Update pom.xml dependency version to 1.13.0 for org.webjars.npm:jquery-ui -->
npm
Update jquery-ui to 1.13.0 or later
npm install jquery-ui@1.13.0

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (4)

Affects 4 ecosystems: Maven (1), npm (1), NuGet (1), RubyGems (1).

PackageFixed In
jquery-ui-rails RubyGems · Affected: 0.0.1, 0.0.2, 0.1.0, 0.2.0 (+33 more)7.0.0
jQuery.UI.Combined NuGet · Affected: 1.10.0, 1.10.1, 1.10.2, 1.10.3 (+29 more)1.13.0
org.webjars.npm:jquery-ui Maven · Affected: 1.10.4, 1.10.5, 1.12.0, 1.12.0-rc.2 (+3 more)1.13.0
jquery-ui npm · Affected: All versions1.13.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

References

Frequently Asked Questions

What is CVE-2021-41183?
XSS in `*Text` options of the Datepicker widget in jquery-ui. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.5/10).
How do I check if my project is affected by CVE-2021-41183?
CVE-2021-41183 affects jquery-ui-rails, jQuery.UI.Combined and org.webjars.npm:jquery-ui (and 1 more). It has a 8.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2021-41183 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.5

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
8.53%
EPSS percentile: 95.8

This places it in the top 5% of EPSS-scored vulnerabilities — 95.8% of tracked vulnerabilities score at or below it, so it is far more likely to be exploited than nearly all other tracked vulnerabilities.

Also Known As

GHSA-j7qv-pgf6-hvh4
BIT-drupal-2021-41183

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Gemfile.lock