CVE-2021-41184
JSON

6.5medium

XSS in the `of` option of the `.position()` util

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
42.9% (higher than 98% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-gpqq-952q-5327BIT-DRUPAL-2021-41184

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.

Affected

Product or packageVersionsReported by
jquery jquery-ui< 1.13.0CVE List
jquery-ui (npm)before 1.13.0GitHub Advisory Database
org.webjars.npm:jquery-ui (Maven)before 1.13.0GitHub Advisory Database
jQuery.UI.Combined (NuGet)before 1.13.0GitHub Advisory Database
jquery-ui-rails (RubyGems)before 7.0.0GitHub Advisory Database
jqueryui jquery_uibefore 1.13.0NVD
fedoraproject fedora33, 34, 35, 36NVD
netapp h300s_firmwareNot specifiedNVD
netapp h500s_firmwareNot specifiedNVD
netapp h700s_firmwareNot specifiedNVD
netapp h300e_firmwareNot specifiedNVD
netapp h500e_firmwareNot specifiedNVD

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD4.3medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:P/A:N
Bitnami Vulnerability Databasemedium rating

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

Accepting the value of the of option of the .position() util from untrusted sources may execute untrusted code. For example, invoking the following code:

$( "#element" ).position( {
	my: "left top",
	at: "right bottom",
	of: "<img onerror='doEvilThing()' src='/404' />",
	collision: "none"
} );

will call the doEvilThing() function.

Patches

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.

Workarounds

A workaround is to not accept the value of the of option from untrusted sources.

For more information

If you have any questions or comments about this advisory, search for a relevant issue in the jQuery UI repo. If you don't find an answer, open a new issue.

NVD (es)

jQuery-UI es la biblioteca oficial de interfaz de usuario de jQuery. Antes de la versión 1.13.0, aceptar el valor de la opción "of" de la utilidad ".position()" de fuentes no confiables podía ejecutar código no confiable. El problema es corregido en jQuery UI versión 1.13.0. Cualquier valor de cadena pasado a la opción "of" se trata ahora como un selector CSS. Una solución es no aceptar el valor de la opción "of" de fuentes no confiables

References

https://blog.jqueryui.com/2021/10/jquery-ui-1-13-0-released/advisory, release-notes, vendor-advisory
https://github.com/jquery/jquery-ui/security/advisories/GHSA-gpqq-952q-5327advisory, mitigation, patch, vendor-advisory, web
https://github.com/jquery/jquery-ui/commit/effa323f1505f2ce7a324e4f429fa9032c72f280advisory, patch, vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/O74SXYY7RGXREQDQUDQD4BPJ4QQTD2XQ/advisory, mailing-list, third-party-advisory, vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SNXA7XRKGINWSUIPIZ6ZBCTV6N3KSHES/advisory, mailing-list, third-party-advisory, vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NXIUUBRVLA4E7G7MMIKCEN75YN7UFERW/advisory, mailing-list, third-party-advisory, vendor-advisory
https://www.oracle.com/security-alerts/cpuapr2022.htmladvisory, patch, third-party-advisory, web
https://security.netapp.com/advisory/ntap-20211118-0004/advisory, third-party-advisory
https://www.drupal.org/sa-core-2022-001advisory, third-party-advisory, web
https://www.oracle.com/security-alerts/cpujul2022.htmladvisory, third-party-advisory, web
https://www.tenable.com/security/tns-2022-09advisory, patch, release-notes, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HVKIOWSXL2RF2ULNAP7PHESYCFSZIJE3/advisory, mailing-list, third-party-advisory, vendor-advisory

Sources

SourceRecordLicence
CVE ListCVE-2021-41184 changed 2026-11-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-gpqq-952q-5327 changed 2026-07-08CC-BY-4.0
NVDCVE-2021-41184 changed 2026-11-02Public domain
Bitnami Vulnerability DatabaseBIT-DRUPAL-2021-41184 changed 2026-09-08Apache-2.0