CVE-2021-41182 XSS in the `altField` option of the Datepicker widget

Medium 6.5 Published Updated

Attackers can execute arbitrary JavaScript via the Datepicker altField option if untrusted input is accepted, affecting applications using jQuery UI.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2021-41182?

CVE-2021-41182 is a medium-severity cross-site scripting vulnerability in Debian Debian Linux, published on 26 Oct 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

jQuery-UI is the official jQuery user interface library. Prior to version 1.13.0, accepting the value of the `altField` option of the Datepicker widget from untrusted sources may execute untrusted code. The issue is fixed in jQuery UI 1.13.0. Any string value passed to the `altField` option is now treated as a CSS selector. A workaround is to not accept the value of the `altField` option from untrusted sources.

Weakness: CWE-79

Which versions are affected by CVE-2021-41182?

9 open source packages ship an affected version, including org.webjars.npm:jquery-ui, drupal and jQuery.UI.Combined. It affects 29 products.

PackageAffectedFixed in
org.webjars.npm:jquery-ui MavenAll versions1.13.0
org.webjars.npm:jquery-ui MavenAll versions1.13.0
drupal BitnamiFrom 7.0.07.86.0
jQuery.UI.Combined NuGetAll versions1.13.0
jQuery.UI.Combined NuGetAll versions1.13.0
jquery-ui-rails RubyGemsAll versions7.0.0
3 more packages
jquery-ui-rails RubyGemsAll versions7.0.0
jquery-ui npmAll versions1.13.0
jquery-ui npmAll versions1.13.0

Products include Debian Debian Linux, Drupal Drupal, Fedoraproject Fedora, Jqueryui Jquery Ui, Netapp H300e Firmware, Netapp H300s Firmware and 23 more.

How do I fix CVE-2021-41182?

Upgrade org.webjars.npm:jquery-ui to 1.13.0 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2021-41182 being exploited?

There is no known exploitation of CVE-2021-41182 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Debian Debian Linux vulnerabilities

Sources

Also known as BIT-drupal-2021-41182, CLEANSTART-2024-NF15761, DEBIAN-CVE-2021-41182, GHSA-9gj3-hwp5-pmwc, MINI-pj36-f7xg-547x, UBUNTU-CVE-2021-41182.

Is CVE-2021-41182 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free