# jQuery UI cross-site scripting in dialog closeText parameter

Source: https://junglewise.ai/threats/jquery-ui-cross-site-scripting-in-dialog-closetext-parameter-65aa5ef7  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2018-07-27. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: info · Published 2018-07-27

jQuery UI is a widely-used JavaScript library that provides interactive UI components for web applications. A cross-site scripting (XSS) vulnerability in the dialog function allows attackers to inject malicious scripts or HTML through the closeText parameter, potentially compromising user sessions, stealing data, or manipulating page content in affected applications.

Technologies: [org.webjars.npm:jquery-ui (Maven)](https://junglewise.ai/threats/technologies/org-webjars-npm-jquery-ui), [jquery-ui (npm)](https://junglewise.ai/threats/technologies/jquery-ui), [jQuery.UI.Combined (NuGet)](https://junglewise.ai/threats/technologies/jquery-ui-combined), [jquery-ui-rails (RubyGems)](https://junglewise.ai/threats/technologies/jquery-ui-rails). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven), [npm](https://junglewise.ai/threats/vendors/npm), [NuGet](https://junglewise.ai/threats/vendors/nuget), [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Informational severity, published 27 July 2018.

**Which products and versions are affected?** org.webjars.npm:jquery-ui (Maven) ECOSYSTEM:introduced=0,fixed=1.12.0; jquery-ui (npm) SEMVER:introduced=0,fixed=1.12.0; jQuery.UI.Combined (NuGet) before 1.12.0; jquery-ui-rails (RubyGems) before 6.0.0.

**Is there a fix for This vulnerability?** Yes. org.webjars.npm:jquery-ui (Maven): upgrade to 1.12.0 or later; jquery-ui (npm): upgrade to 1.12.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run org.webjars.npm:jquery-ui (Maven), jquery-ui (npm), jQuery.UI.Combined (NuGet) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- org.webjars.npm:jquery-ui (Maven): upgrade to 1.12.0 or later

  ```sh
  # set org.webjars.npm:jquery-ui to 1.12.0 in your pom.xml or build.gradle
  ```

- jquery-ui (npm): upgrade to 1.12.0 or later

  ```sh
  npm install jquery-ui@1.12.0
  ```


## Technical details

This is a cross-site scripting (XSS) vulnerability in jQuery UI's dialog function. The closeText parameter fails to properly sanitize user-supplied input, allowing remote attackers to inject arbitrary HTML or JavaScript code. The vulnerability affects all versions prior to 1.12.0. An attacker can exploit this by providing a specially crafted closeText value when initializing a dialog, which would execute in the context of the user's browser. The vulnerability was patched in jQuery UI 1.12.0 and corresponding versions of dependent packages (jquery-ui-rails 6.0.0, jQuery.UI.Combined 1.12.0).

## Affected products

- jQuery Foundation jQuery UI before 1.12.0
- NuGet jQuery.UI.Combined before 1.12.0
- RubyGems jquery-ui-rails before 6.0.0

## Timeline

- 2018-07-27: disclosed: Published to GitHub Advisory Database
- 2020-06-16: other: Advisory withdrawn as accidental duplicate publish

## Related threats

- [jQuery UI XSS in checkboxradio refresh with HTML-like label text](https://junglewise.ai/threats/cve-2022-31160-jquery-ui-xss-in-checkboxradio-refresh-with-html-like-label-text)
- [jQuery UI Datepicker XSS in text options](https://junglewise.ai/threats/cve-2021-41183-jquery-ui-datepicker-xss-in-text-options)
- [jQuery UI XSS in position() method](https://junglewise.ai/threats/cve-2021-41184-jquery-ui-xss-in-position-method)
- [jQuery UI Datepicker XSS in altField option](https://junglewise.ai/threats/cve-2021-41182-jquery-ui-datepicker-xss-in-altfield-option)
- [jQuery UI cross-site scripting in Dialog title](https://junglewise.ai/threats/cve-2010-5312-jquery-ui-cross-site-scripting-in-dialog-title)
