CVE-2022-31160
jQuery UI contains potential XSS vulnerability when refreshing a checkboxradio with an HTML-like initial text label
Also known as GHSA-h6gj-6jjq-h8g9
Mitigation
- Upgrade jquery-ui to 1.13.2 or later.
- Upgrade org.webjars.npm:jquery-ui to 1.13.2 or later.
- Upgrade jquery-ui-rails to 8.0.0 or later.
- Upgrade jQuery.UI.Combined to 1.13.2 or later.
Who should check
- Projects that depend on npm package jquery-ui (< 1.13.2)
- Projects that depend on Maven package org.webjars.npm:jquery-ui (< 1.13.2)
- Projects that depend on RubyGems package jquery-ui-rails (< 8.0.0)
- Projects that depend on NuGet package jQuery.UI.Combined (< 1.13.2)
- Anyone running jquery-ui < 1.13.2
Vulnerability facts
- Affected
- jquery-ui < 1.13.2; org.webjars.npm:jquery-ui < 1.13.2; jquery-ui-rails < 8.0.0; jQuery.UI.Combined < 1.13.2
- Fixed in
- 1.13.2, 8.0.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 6.1 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: None
- EPSS
- 2.54% chance of exploitation in 30 days (percentile 86, 2026-11-26)
- CWE
- CWE-79
- Modified
Description
jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of jQuery. Versions prior to 1.13.2 are potentially vulnerable to cross-site scripting. Initializing a checkboxradio widget on an input enclosed within a label makes that parent label contents considered as the input label. Calling `.checkboxradio( "refresh" )` on such a widget and the initial HTML contained encoded HTML entities will make them erroneously get decoded. This can lead to potentially executing JavaScript code. The bug has been patched in jQuery UI 1.13.2. To remediate the issue, someone who can change the initial HTML can wrap all the non-input contents of the `label` in a `span`.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm jquery-ui | < 1.13.2 | 1.13.2 | osv |
| Maven org.webjars.npm:jquery-ui | < 1.13.2 | 1.13.2 | osv |
| RubyGems jquery-ui-rails | < 8.0.0 | 8.0.0 | osv |
| NuGet jQuery.UI.Combined | < 1.13.2 | 1.13.2 | osv |
| jquery-ui | < 1.13.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-31160. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-31160.md Affected: jquery-ui < 1.13.2; org.webjars.npm:jquery-ui < 1.13.2; jquery-ui-rails < 8.0.0; jQuery.UI.Combined < 1.13.2 Fixed in: 1.13.2, 8.0.0 Steps: 1. Search this machine and project for jquery-ui (npm), org.webjars.npm:jquery-ui (Maven), jquery-ui-rails (RubyGems), jQuery.UI.Combined (NuGet), jquery-ui: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
- https://github.com/jquery/jquery-ui/security/advisories/GHSA-h6gj-6jjq-h8g9
- https://blog.jqueryui.com/2022/07/jquery-ui-1-13-2-released/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QB2FJQXCNHO32VGVOC6DY6IPGVE4VDU6/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6XBR3G3JR5ZIOJDO4224M3INXDS2VFDD/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/J5LGNTICB5BRFAG3DHVVELS6H3CZSQMO/
- https://nvd.nist.gov/vuln/detail/CVE-2022-31160
Other
- https://www.drupal.org/sa-contrib-2022-052
- https://security.netapp.com/advisory/ntap-20220909-0007/
- https://lists.debian.org/debian-lts-announce/2022/12/msg00015.html
- https://blog.jqueryui.com/2022/07/jquery-ui-1-13-2-released
- https://github.com/jquery-ui-rails/jquery-ui-rails/blob/master/VERSIONS.md
- https://github.com/jquery-ui-rails/jquery-ui-rails/releases/tag/v8.0.0-release
- https://github.com/jquery/jquery-ui
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/jquery-ui-rails/CVE-2022-31160.yml
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6XBR3G3JR5ZIOJDO4224M3INXDS2VFDD
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/J5LGNTICB5BRFAG3DHVVELS6H3CZSQMO
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QB2FJQXCNHO32VGVOC6DY6IPGVE4VDU6
- https://security.netapp.com/advisory/ntap-20220909-0007
FAQ
Is CVE-2022-31160 being exploited?
There is no confirmed exploitation: CVE-2022-31160 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 2.54% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-31160?
Medium: CVSS 6.1 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2022-31160?
jquery-ui < 1.13.2; org.webjars.npm:jquery-ui < 1.13.2; jquery-ui-rails < 8.0.0; jQuery.UI.Combined < 1.13.2.
Is there a fix for CVE-2022-31160?
Yes. Fixed in 1.13.2, 8.0.0. Upgrade jquery-ui to 1.13.2 or later. Upgrade org.webjars.npm:jquery-ui to 1.13.2 or later. Upgrade jquery-ui-rails to 8.0.0 or later. Upgrade jQuery.UI.Combined to 1.13.2 or later.
How do I check if I'm affected by CVE-2022-31160?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.