# 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.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`)
- **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:** Yes
- **Published:** 26 Oct 2021
- **Updated:** 4 Nov 2025
- **Also known as:** BIT-drupal-2021-41184, DEBIAN-CVE-2021-41184, GHSA-gpqq-952q-5327, MINI-275h-hw74-rfr2, UBUNTU-CVE-2021-41184

## 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 (Improper Neutralization of Input During Web Page Generation)

## 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 | Ecosystem | 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 |
| `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: Drupal Drupal, Fedoraproject Fedora, Jqueryui Jquery Ui, Netapp H300e Firmware, Netapp H300s Firmware, Netapp H410c Firmware, Netapp H410s Firmware, Netapp H500e Firmware, Netapp H500s Firmware, Netapp H700e Firmware, Netapp H700s Firmware, Oracle Agile Product Lifecycle Management, Oracle Application Express, Oracle Banking Platform, Oracle Big Data Spatial and Graph, Oracle Communications Interactive Session Recorder, Oracle Communications Operations Monitor, Oracle Hospitality Inventory Management, Oracle Hospitality Materials Control, Oracle Hospitality Suite8 and 7 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.

## 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:

- https://github.com/gabrielolivra/Exploit-Medium-CVE-2021-41184 (github_poc): https://github.com/gabrielolivra/Exploit-Medium-CVE-2021-41184

## Other vulnerabilities in Drupal Drupal

- [CVE-2026-9082](https://insights.sbomify.com/CVE-2026-9082/): Drupal Core SQL Injection (critical 9.8, exploited in the wild)
- [CVE-2020-13671](https://insights.sbomify.com/CVE-2020-13671/): Drupal core Un-restricted Upload of File (high 8.8, exploited in the wild)
- [CVE-2019-6340](https://insights.sbomify.com/CVE-2019-6340/): Drupal Core Remote Code Execution (high 8.1, exploited in the wild)
- [CVE-2009-3352](https://insights.sbomify.com/CVE-2009-3352/): Other in n/a (critical 10.0)
- [CVE-2024-55636](https://insights.sbomify.com/CVE-2024-55636/): Drupal core - Less critical - Gadget chain - SA-CORE-2024-006 (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-41184 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2021-41184 in the wild and no public exploit code.

Affected packages and fixed versions:
- drupal (Bitnami): affected from 7.0.0; fixed in 7.86.0, 9.2.11, 9.3.3
- org.webjars.npm:jquery-ui (Maven): affected all versions; fixed in 1.13.0
- org.webjars.npm:jquery-ui (Maven): affected all versions; fixed in 1.13.0
- jQuery.UI.Combined (NuGet): affected all versions; fixed in 1.13.0
- jQuery.UI.Combined (NuGet): affected all versions; fixed in 1.13.0
- jquery-ui-rails (RubyGems): affected all versions; fixed in 7.0.0
- jquery-ui-rails (RubyGems): affected all versions; fixed in 7.0.0
- jquery-ui (npm): affected all versions; fixed in 1.13.0
- jquery-ui (npm): affected all versions; fixed in 1.13.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-41184/ (Markdown: https://insights.sbomify.com/CVE-2021-41184/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-41184
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-41184
- OSV: https://osv.dev/vulnerability/CVE-2021-41184

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-41184/
Summaries are generated and may contain mistakes; the official description above is the record.
