Vulnerabilities in pkg:gem/jquery-ui-rails
PACKAGECVE-2021-41184 is a MODERATE (CVSS 6.5) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Jquery ui libraries in the npm ecosystem. The issue involves xss in the `of` option of the `.position()` util in jquery-ui. Remediation is available by upgrading affected packages to version 1.13.0, 7.0.0.
pkg:gem/jquery-ui-rails
Vulnerability advisories affecting package pkg:gem/jquery-ui-rails. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-gpqq-952q-5327 | CVE-2021-41184 | MODERATE | XSS in the `of` option of the `.position()` util in jquery-ui |
| GHSA-h6gj-6jjq-h8g9 | CVE-2022-31160 | MODERATE | jQuery UI vulnerable to XSS when refreshing a checkboxradio with an HTML-like initial text label |
| GHSA-wcm2-9c89-wmfm | CVE-2010-5312 | MODERATE | Cross-site Scripting in jquery-ui |
| GHSA-qqxp-xp9v-vvx6 | CVE-2012-6662 | MODERATE | jquery-ui Tooltip widget vulnerable to XSS |
| GHSA-g8q2-24jh-5hpc | - | HIGH | High severity vulnerability that affects jquery-ui |
| GHSA-hpcf-8vf9-q4gj | CVE-2016-7103 | MODERATE | jQuery-UI vulnerable to Cross-site Scripting in dialog closeText |
| GHSA-j7qv-pgf6-hvh4 | CVE-2021-41183 | MODERATE | XSS in `*Text` options of the Datepicker widget in jquery-ui |
| GHSA-9gj3-hwp5-pmwc | CVE-2021-41182 | MODERATE | XSS in the `altField` option of the Datepicker widget in jquery-ui |
CVE-2021-41184 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N).
How to Fix CVE-2021-41184
To remediate this vulnerability, upgrade all affected Jquery ui dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install jquery-ui@1.13.0
<dependency>
<groupId>org.webjars.npm</groupId>
<artifactId>jquery-ui</artifactId>
<version>1.13.0</version>
</dependency>
Upgrade jQuery.UI.Combined to 1.13.0
Upgrade jquery-ui-rails to 7.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls jquery-ui
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-41184, inspect your project dependencies using npm:
npm ls jquery-ui
Analyze the terminal output to locate any version of Jquery ui in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.13.0), your application is affected.
Note: The npm ls jquery-ui command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Jquery ui, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-41184 Affected Jquery ui Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jquery-ui
|
npm |
< 1.13.0
|
1.13.0
|
|
org.webjars.npm:jquery-ui
|
Maven |
< 1.13.0
|
1.13.0
|
|
jQuery.UI.Combined
|
NuGet |
< 1.13.0
|
1.13.0
|
|
jquery-ui-rails
|
RubyGems |
< 7.0.0
|
7.0.0
|
References
Frequently Asked Questions
What is CVE-2021-41184?
Which Jquery ui versions are affected?
What version fixes CVE-2021-41184?
Is jquery-ui affected?
Is jQuery.UI.Combined affected?
What is the CVSS score of CVE-2021-41184?
What CWE is associated with CVE-2021-41184?
How can I check npm dependencies for CVE-2021-41184?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gpqq-952q-5327",
"modified" : "2025-11-04T19:36:07Z",
"published" : "2021-10-26T14:55:12Z",
"aliases" : [ "CVE-2021-41184" ],
"summary" : "XSS in the `of` option of the `.position()` util in jquery-ui",
"details" : "### Impact\nAccepting the value of the `of` option of the [`.position()`](https://api.jqueryui.com/position/) util from untrusted sources may execute untrusted code. For example, invoking the following code:\n```js\n$( \"#element\" ).position( {\n\tmy: \"left top\",\n\tat: \"right bottom\",\n\tof: \"<img onerror='doEvilThing()' src='/404' />\",\n\tcollision: \"none\"\n} );\n```\nwill call the `doEvilThing()` function.\n\n### Patches\nThe issue is fixed in jQuery UI 1.13.0. Any string value passed to the `of` option is now treated as a CSS selector.\n\n### Workarounds\nA workaround is to not accept the value of the `of` option from untrusted sources.\n\n### For more information\nIf you have any questions or comments about this advisory, search for a relevant issue in [the jQuery UI repo](https://github.com/jquery/jquery-ui/issues). If you don't find an answer, open a new issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jquery-ui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.13.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.webjars.npm:jquery-ui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.13.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "jQuery.UI.Combined"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.13.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "jquery-ui-rails"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jquery/jquery-ui/security/advisories/GHSA-gpqq-952q-5327"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41184"
}, {
"type" : "WEB",
"url" : "https://github.com/jquery/jquery-ui/commit/effa323f1505f2ce7a324e4f429fa9032c72f280"
}, {
"type" : "WEB",
"url" : "https://www.tenable.com/security/tns-2022-09"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpujul2022.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
}, {
"type" : "WEB",
"url" : "https://www.drupal.org/sa-core-2022-001"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20211118-0004"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SNXA7XRKGINWSUIPIZ6ZBCTV6N3KSHES"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SGSY236PYSFYIEBRGDERLA7OSY6D7XL4"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O74SXYY7RGXREQDQUDQD4BPJ4QQTD2XQ"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NXIUUBRVLA4E7G7MMIKCEN75YN7UFERW"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HVKIOWSXL2RF2ULNAP7PHESYCFSZIJE3"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SNXA7XRKGINWSUIPIZ6ZBCTV6N3KSHES"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SGSY236PYSFYIEBRGDERLA7OSY6D7XL4"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/O74SXYY7RGXREQDQUDQD4BPJ4QQTD2XQ"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NXIUUBRVLA4E7G7MMIKCEN75YN7UFERW"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HVKIOWSXL2RF2ULNAP7PHESYCFSZIJE3"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/08/msg00040.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jquery/jquery-ui"
}, {
"type" : "WEB",
"url" : "https://blog.jqueryui.com/2021/10/jquery-ui-1-13-0-released"
}, {
"type" : "WEB",
"url" : "http://seclists.org/fulldisclosure/2024/Aug/37"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-10-25T22:06:43Z",
"nvd_published_at" : "2021-10-26T15:15:00Z"
}
}