CVE-2021-41184 XSS in the `of` option of the `.position()` util

Medium 6.5 Published Updated

Attackers can execute arbitrary JavaScript by passing untrusted strings to the position utility's 'of' option in 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-41184?

CVE-2021-41184 is a medium-severity cross-site scripting vulnerability in Drupal Drupal, 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 `of` option of the `.position()` util from untrusted sources may execute untrusted code. The issue is fixed in jQuery UI 1.13.0. Any string value passed to the `of` option is now treated as a CSS selector. A workaround is to not accept the value of the `of` option from untrusted sources.

Weakness: CWE-79

Which versions are affected by CVE-2021-41184?

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

PackageAffectedFixed in
drupal BitnamiFrom 7.0.07.86.0, 9.2.11, 9.3.3
org.webjars.npm:jquery-ui MavenAll versions1.13.0
org.webjars.npm:jquery-ui MavenAll versions1.13.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 Drupal Drupal, Fedoraproject Fedora, Jqueryui Jquery Ui, Netapp H300e Firmware, Netapp H300s Firmware, Netapp H410c Firmware and 21 more.

How do I fix CVE-2021-41184?

Upgrade drupal to a fixed version for your release line: 7.86.0, 9.2.11 or 9.3.3.

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-41184 being exploited?

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

Public exploit code: 1 proofs of concept on GitHub.

All Drupal Drupal vulnerabilities

Sources

Also known as BIT-drupal-2021-41184, DEBIAN-CVE-2021-41184, GHSA-gpqq-952q-5327, MINI-275h-hw74-rfr2, UBUNTU-CVE-2021-41184.

Is CVE-2021-41184 in your software?

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

Check your SBOMs for free