CVE-2021-41184

Cross-Site Scripting
Affects
jQuery UI
in
jQuery
No items found.
Versions
<1.13.0
Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of jQuery that provides a comprehensive suite of UI components for modern web applications.

A medium-severity Cross-Site Scripting (XSS) vulnerability (CVE-2021-41184) has been identified in jQuery UI. The .position() utility's handling of the of option could allow attackers to inject malicious scripts through HTML markup in user-controlled strings, leading to arbitrary code execution.

Per OWASP: Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted websites. XSS attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user.

Details

Module Info

Vulnerability Info

This medium-severity vulnerability is found in jQuery UI versions prior to 1.13.0. See the affected versions above for specific details.

The vulnerability affected the .position() utility:

  • $.fn.position() in ui/jquery.ui.position.js accepted string values for the of option without validation, passing them directly to jQuery's $() constructor which interprets HTML markup as DOM elements rather than CSS selectors.
  • When user-controlled strings containing HTML tags (e.g., <img> with onerror handlers) were passed to the of option, the browser would parse and execute embedded JavaScript.
  • Applications using .position() with untrusted input in the of parameter were vulnerable to script injection.

This vulnerability could be exploited by:

  • providing crafted HTML strings to the of option containing special characters and tags (<, >, ", ')
  • injecting script tags or event handlers (e.g., onerror, onload) through malicious HTML markup
  • leveraging applications that pass user-controlled data to .position() without sanitization

Mitigation

jQuery UI version 1.8.x is End-of-Life and will not receive any updates to address this issue from the jQuery team.

Users of the affected .position() utility should apply one of the following mitigations:

  • Upgrade affected applications to jQuery UI 1.13.0 or later.
  • Validate and sanitize any values from untrusted sources before passing them to .position().
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.

Vulnerability Details
ID
CVE-2021-41184
PROJECT Affected
jQuery UI
Versions Affected
<1.13.0
NES Versions Affected
Published date
January 27, 2026
≈ Fix date
January 26, 2026
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
Category
Cross-Site Scripting
Sign up for the latest vulnerability alerts fixed in
NES for jQuery
Rss feed icon
Subscribe via RSS
or

By clicking “submit” I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.