CVE-2010-5312: Cross-site Scripting in jquery-ui

jquery-ui Updated 02 Oct 2025

Summary

24/10/2017
Yes i
Moderate
6.1

CVE-2010-5312: Cross-site Scripting in jquery-ui. Affects jquery-ui versions >= 1.7.0, < 1.10.0. Fixed in 1.10.0. How to fix ↓

Also tracked for

The same CVE-2010-5312 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The package under scrutiny is jquery-ui, an open-source JavaScript library that provides a set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript library. It is widely used for creating interactive web applications. The vulnerability in question is a cross-site scripting (XSS) vulnerability in the Dialog widget of jQuery UI before version 1.10.0. This vulnerability allows remote attackers to inject arbitrary web script or HTML via the title option.

Vulnerability Detail

The cross-site scripting (XSS) vulnerability in jquery.ui.dialog.js in the Dialog widget in jQuery UI before 1.10.0 allows remote attackers to inject arbitrary web script or HTML via the title option. This vulnerability can be exploited by an attacker to execute malicious code in the context of the affected user's browser, potentially leading to various security issues such as session hijacking, data theft, or defacement of the affected website. The vulnerability is rated as moderate severity with a CVSS score of 6.1.

How To Fix

Minimum fixed version

1.10.0

This is the first release that contains the fix.

npm install jquery-ui@1.10.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to a newer version of jQuery UI is not immediately feasible, a possible workaround is to sanitize user input before using it as the title option in the Dialog widget. This can be done by using appropriate input validation and output encoding techniques to prevent the execution of malicious scripts. Here is an example of how input validation and output encoding can be implemented in JavaScript:

function sanitizeInput(input) {
  // Perform input validation to ensure it does not contain any malicious scripts
  // Return sanitized input
  return input;
}

var title = sanitizeInput(userInput);

// Use the sanitized input as the title option in the Dialog widget

Conclusion

In conclusion, the jquery-ui package is vulnerable to a cross-site scripting (XSS) vulnerability in the Dialog widget. This vulnerability can be exploited by remote attackers to inject arbitrary web script or HTML. To mitigate this vulnerability, it is crucial to upgrade to jQuery UI version 1.10.0 or later. Additionally, input validation and output encoding techniques can be implemented as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for jquery-ui →

Share this vulnerability

FAQ

This vulnerability allows remote attackers to inject arbitrary web script or HTML, potentially leading to various security issues such as session hijacking, data theft, or defacement of the affected website.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just the package-lock.json file.

This vulnerability is rated as moderate severity with a CVSS score of 6.1.

A possible workaround is to sanitize user input before using it as the title option in the Dialog widget. This can be done by implementing input validation and output encoding techniques to prevent the execution of malicious scripts.

To fix this vulnerability, it is recommended to upgrade to jQuery UI version 1.10.0 or later, which includes a fix for the XSS vulnerability in the Dialog widget.

Related vulnerabilities

Recent vulnerabilities recorded for jquery-ui.

How To Fix

Minimum fixed version

1.10.0

This is the first release that contains the fix.

npm install jquery-ui@1.10.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback