CVE-2021-41184 XSS in the `of` option of the `.position()` util
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.
| Package | Affected | Fixed in |
|---|---|---|
drupal Bitnami | From 7.0.0 | 7.86.0, 9.2.11, 9.3.3 |
org.webjars.npm:jquery-ui Maven | All versions | 1.13.0 |
org.webjars.npm:jquery-ui Maven | All versions | 1.13.0 |
jQuery.UI.Combined NuGet | All versions | 1.13.0 |
jQuery.UI.Combined NuGet | All versions | 1.13.0 |
jquery-ui-rails RubyGems | All versions | 7.0.0 |
3 more packages
jquery-ui-rails RubyGems | All versions | 7.0.0 |
jquery-ui npm | All versions | 1.13.0 |
jquery-ui npm | All versions | 1.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.
Other vulnerabilities in Drupal Drupal
Sources
Also known as BIT-drupal-2021-41184, DEBIAN-CVE-2021-41184, GHSA-gpqq-952q-5327, MINI-275h-hw74-rfr2, UBUNTU-CVE-2021-41184.