CVE-2022-31160
jQuery UI contains potential XSS vulnerability when refreshing a checkboxradio with an HTML-like initial text label
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.1
jQuery UI contains potential XSS vulnerability when refreshing a checkboxradio with an HTML-like initial text label
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.
- Record
CVE-2022-31160- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2022-6344
6.1
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.
- Record
EUVD-2022-6344- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-h6gj-6jjq-h8g9
6.1
jQuery UI vulnerable to XSS when refreshing a checkboxradio with an HTML-like initial text label
Impact
Initializing a checkboxradio widget on an input enclosed within a label makes that parent label contents considered as the input label. If you call .checkboxradio( "refresh" ) on such a widget and the initial HTML contained encoded HTML entities, they will erroneously get decoded. This can lead to potentially executing JavaScript code.
For example, starting with the following initial secure HTML:
<label>
<input id="test-input">
<img src=x onerror="alert(1)">
</label>
and calling:
$( "#test-input" ).checkboxradio();
$( "#test-input" ).checkboxradio( "refresh" );
will turn the initial HTML into:
<label>
<!-- some jQuery UI elements -->
<input id="test-input">
<img src=x onerror="alert(1)">
</label>
and the alert will get executed.
Patches
The bug has been patched in jQuery UI 1.13.2.
Workarounds
To remediate the issue, if you can change the initial HTML, you can wrap all the non-input contents of the label in a span:
<label>
<input id="test-input">
<span><img src=x onerror="alert(1)"></span>
</label>
References
https://blog.jqueryui.com/2022/07/jquery-ui-1-13-2-released/
For more information
If you have any questions or comments about this advisory, search for a relevant issue in the jQuery UI repo. If you don't find an answer, open a new issue.
- Record
GHSA-h6gj-6jjq-h8g9- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
6.1
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.
- Record
CVE-2022-31160- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
6.1
jQuery UI contains potential XSS vulnerability when refreshing a checkboxradio with an HTML-like initial text label
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.
- Record
CVE-2022-31160- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2022-31160
6.1
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.
- Record
DEBIAN-CVE-2022-31160- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-03
Show 6 moreShow less
OSVGHSA-h6gj-6jjq-h8g9
6.1
jQuery UI vulnerable to XSS when refreshing a checkboxradio with an HTML-like initial text label
Impact
Initializing a checkboxradio widget on an input enclosed within a label makes that parent label contents considered as the input label. If you call .checkboxradio( "refresh" ) on such a widget and the initial HTML contained encoded HTML entities, they will erroneously get decoded. This can lead to potentially executing JavaScript code.
For example, starting with the following initial secure HTML:
<label>
<input id="test-input">
<img src=x onerror="alert(1)">
</label>
and calling:
$( "#test-input" ).checkboxradio();
$( "#test-input" ).checkboxradio( "refresh" );
will turn the initial HTML into:
<label>
<!-- some jQuery UI elements -->
<input id="test-input">
<img src=x onerror="alert(1)">
</label>
and the alert will get executed.
Patches
The bug has been patched in jQuery UI 1.13.2.
Workarounds
To remediate the issue, if you can change the initial HTML, you can wrap all the non-input contents of the label in a span:
<label>
<input id="test-input">
<span><img src=x onerror="alert(1)"></span>
</label>
References
https://blog.jqueryui.com/2022/07/jquery-ui-1-13-2-released/
For more information
If you have any questions or comments about this advisory, search for a relevant issue in the jQuery UI repo. If you don't find an answer, open a new issue.
- Record
GHSA-h6gj-6jjq-h8g9- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2022-31160
6.1
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.
- Record
UBUNTU-CVE-2022-31160- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVCLSA-2026-1773188127 No score
TuxCare security update for jquery-ui (5 CVEs)
TuxCare rebuilt jquery-ui to address 5 CVEs. Fixed in 1.10.4-tuxcare.1.
- Record
CLSA-2026-1773188127- Updated
- 2026-11-02
OSVCLSA-2026-1792502475 No score
TuxCare security update for jquery-ui (5 CVEs)
TuxCare rebuilt jquery-ui to address 5 CVEs. Fixed in 1.10.3-tuxcare.1.
- Record
CLSA-2026-1792502475- Updated
- 2026-11-02
OSVUSN-5181-1 No score
jqueryui vulnerability
It was discovered that jQuery UI did not properly validate the values from untrusted sources. An attacker could use this vulnerability to cause a crash or possibly execute arbitrary code. This issue affected only Ubuntu 18.04 ESM and Ubuntu 20.4 ESM. (CVE-2021-41184)
It was discovered that jQuery UI checkboxradio widget did not properly decode certain values from HTML entities. An attacker could possibly use this issue to generate a cross-site scripting(XSS) attack, resulting in a crash or possibly execute arbitrary code. (CVE-2022-31160)
- Record
USN-5181-1- Updated
- 2026-11-02
OSVUSN-6419-1 No score
jqueryui vulnerabilities
Hong Phat Ly discovered that jQuery UI did not properly manage parameters from untrusted sources, which could lead to arbitrary web script or HTML code injection. A remote attacker could possibly use this issue to perform a cross-site scripting (XSS) attack. This issue only affected Ubuntu 14.04 LTS and Ubuntu 16.04 LTS. (CVE-2016-7103)
Esben Sparre Andreasen discovered that jQuery UI did not properly handle values from untrusted sources in the Datepicker widget. A remote attacker could possibly use this issue to perform a cross-site scripting (XSS) attack and execute arbitrary code. This issue only affected Ubuntu 14.04 LTS, Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, and Ubuntu 20.04 LTS. (CVE-2021-41182, CVE-2021-41183)
It was discovered that jQuery UI did not properly validate values from untrusted sources. An attacker could possibly use this issue to cause a denial of service or execute arbitrary code. This issue only affected Ubuntu 20.04 LTS. (CVE-2021-41184)
It was discovered that the jQuery UI checkboxradio widget did not properly decode certain values from HTML entities. An attacker could possibly use this issue to perform a cross-site scripting (XSS) attack and cause a denial of service or execute arbitrary code. This issue only affected Ubuntu 20.04 LTS. (CVE-2022-31160)
- Record
USN-6419-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
jquery-uinpm |
before 1.13.2 | 1.13.2 |
org.webjars.npm:jquery-uiMaven |
before 1.13.2 | 1.13.2 |
jQuery.UI.CombinedNuGet |
before 1.13.2 | 1.13.2 |
jquery-ui-railsRubyGems |
before 8.0.0 | 8.0.0 |
jquery-uiTuxCare:npm From an advisory covering 5 CVEs |
1.10.4-tuxcare.0 up to 1.10.4-tuxcare.1, plus listed versions 1.10.4 |
1.10.4-tuxcare.1 |
jquery-uiTuxCare:npm From an advisory covering 5 CVEs |
1.10.3-tuxcare.0 up to 1.10.3-tuxcare.1, plus listed versions 1.10.3 |
1.10.3-tuxcare.1 |
jqueryuiDebian:12 |
before 1.13.2+dfsg-1 | 1.13.2+dfsg-1 |
jqueryuiDebian:13 |
before 1.13.2+dfsg-1 | 1.13.2+dfsg-1 |
jqueryuiDebian:14 |
before 1.13.2+dfsg-1 | 1.13.2+dfsg-1 |
jqueryuiDebian:10 From an advisory covering 4 CVEs |
before 1.12.1+dfsg-5+deb10u1, plus listed versions 1.12.1+dfsg-5 |
1.12.1+dfsg-5+deb10u1 |
Show 14 moreShow less
| Package | Affected | Fixed |
|---|---|---|
org.webjars.npm:jquery-uiMaven |
before 1.13.2, plus listed versions 1.10.41.10.51.12.01.12.0-rc.21.12.1 Show 4 moreShow less1.13.01.13.0-rc.21.13.0-rc.31.13.1 |
1.13.2 |
jquery-ui-railsRubyGems |
before 8.0.0, plus listed versions 0.0.10.0.20.1.00.2.00.2.1 Show 33 moreShow less0.2.20.3.00.4.00.4.10.5.01.0.01.1.01.1.12.0.02.0.12.0.23.0.03.0.14.0.04.0.14.0.24.0.34.0.44.0.54.1.04.1.14.1.24.2.04.2.15.0.05.0.15.0.25.0.35.0.45.0.56.0.06.0.17.0.0 |
8.0.0 |
jQuery.UI.CombinedNuGet |
before 1.13.2, plus listed versions 1.10.01.10.11.10.21.10.31.10.4 Show 30 moreShow less1.11.01.11.11.11.21.11.31.11.41.12.01.12.11.13.01.13.11.8.101.8.111.8.121.8.131.8.141.8.151.8.161.8.171.8.181.8.191.8.201.8.20.11.8.211.8.221.8.231.8.241.8.91.9.01.9.0-RC11.9.11.9.2 |
1.13.2 |
jqueryuiUbuntu:Pro:18.04:LTS |
before 1.12.1+dfsg-5ubuntu0.18.04.1~esm2, plus listed versions 1.12.1+dfsg-5 |
1.12.1+dfsg-5ubuntu0.18.04.1~esm2 |
jqueryuiUbuntu:20.04:LTS |
before 1.12.1+dfsg-5ubuntu0.20.04.1, plus listed versions 1.12.1+dfsg-5 |
1.12.1+dfsg-5ubuntu0.20.04.1 |
jqueryuiUbuntu:Pro:20.04:LTS |
before 1.12.1+dfsg-5ubuntu0.20.04.1~esm3, plus listed versions 1.12.1+dfsg-51.12.1+dfsg-5ubuntu0.1~esm2 |
1.12.1+dfsg-5ubuntu0.20.04.1~esm3 |
jqueryuiUbuntu:Pro:22.04:LTS |
before 1.13.1+dfsg-1ubuntu0.1~esm1, plus listed versions 1.12.1+dfsg-81.13.0+dfsg-11.13.1+dfsg-1 |
1.13.1+dfsg-1ubuntu0.1~esm1 |
jqueryuiUbuntu:Pro:18.04:LTS From an advisory covering 2 CVEs |
before 1.12.1+dfsg-5ubuntu0.18.04.1~esm2, plus listed versions 1.12.1+dfsg-5 |
1.12.1+dfsg-5ubuntu0.18.04.1~esm2 |
jqueryuiUbuntu:Pro:20.04:LTS From an advisory covering 2 CVEs |
before 1.12.1+dfsg-5ubuntu0.20.04.1~esm3, plus listed versions 1.12.1+dfsg-51.12.1+dfsg-5ubuntu0.1~esm2 |
1.12.1+dfsg-5ubuntu0.20.04.1~esm3 |
jqueryuiUbuntu:Pro:22.04:LTS From an advisory covering 2 CVEs |
before 1.13.1+dfsg-1ubuntu0.1~esm1, plus listed versions 1.12.1+dfsg-81.13.0+dfsg-11.13.1+dfsg-1 |
1.13.1+dfsg-1ubuntu0.1~esm1 |
jqueryuiUbuntu:Pro:14.04:LTS From an advisory covering 5 CVEs |
before 1.10.1+dfsg-1ubuntu0.14.04.1~esm1, plus listed versions 1.10.1+dfsg-1 |
1.10.1+dfsg-1ubuntu0.14.04.1~esm1 |
jqueryuiUbuntu:Pro:16.04:LTS From an advisory covering 5 CVEs |
before 1.10.1+dfsg-1ubuntu0.16.04.1~esm1, plus listed versions 1.10.1+dfsg-1 |
1.10.1+dfsg-1ubuntu0.16.04.1~esm1 |
jqueryuiUbuntu:Pro:18.04:LTS From an advisory covering 5 CVEs |
before 1.12.1+dfsg-5ubuntu0.18.04.1~esm3, plus listed versions 1.12.1+dfsg-51.12.1+dfsg-5ubuntu0.18.04.1~esm2 |
1.12.1+dfsg-5ubuntu0.18.04.1~esm3 |
jqueryuiUbuntu:20.04:LTS From an advisory covering 5 CVEs |
before 1.12.1+dfsg-5ubuntu0.20.04.1, plus listed versions 1.12.1+dfsg-5 |
1.12.1+dfsg-5ubuntu0.20.04.1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | CyberOne-TeamARES/jquery-cve-2022-31160 | 2025-08-12 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-31160 is a medium vulnerability (CVSS 6.1) in Jqueryui Jquery Ui, published July 18, 2022. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 2.69%, the 85th percentile. Fixed in jquery-ui 1.13.2.
References
github.com/jquery/jquery-ui/security/advisories/GHSA-h6gj-6jjq-h8g9
github.com/jquery/jquery-ui/commit/8cc5bae1caa1fcf96bf5862c5646c787020ba3f9
blog.jqueryui.com/2022/07/jquery-ui-1-13-2-released
drupal.org/sa-contrib-2022-052
security.netapp.com/advisory/ntap-20220909-0007
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QB2FJQXCNHO32VGVOC6DY6IPGVE4VDU6
Show 22 moreShow less
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6XBR3G3JR5ZIOJDO4224M3INXDS2VFDD
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/J5LGNTICB5BRFAG3DHVVELS6H3CZSQMO
lists.debian.org/debian-lts-announce/2022/12/msg00015.html
nvd.nist.gov/vuln/detail/CVE-2022-31160
github.com/jquery-ui-rails/jquery-ui-rails/blob/master/VERSIONS.md
lists.fedoraproject.org/archives/list/[email protected]/message/6XBR3G3JR5ZIOJDO4224M3INXDS2VFDD
lists.fedoraproject.org/archives/list/[email protected]/message/J5LGNTICB5BRFAG3DHVVELS6H3CZSQMO
lists.fedoraproject.org/archives/list/[email protected]/message/QB2FJQXCNHO32VGVOC6DY6IPGVE4VDU6
github.com/jquery-ui-rails/jquery-ui-rails/releases/tag/v8.0.0-release
github.com/rubysec/ruby-advisory-db/blob/master/gems/jquery-ui-rails/CVE-2022-31160.yml
github.com/advisories/GHSA-h6gj-6jjq-h8g9
github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31160.json
security-tracker.debian.org/tracker/CVE-2022-31160
github.com/jquery/jquery-ui
ubuntu.com/security/CVE-2022-31160
ubuntu.com/security/notices/USN-5181-1
ubuntu.com/security/notices/USN-6419-1
cve.org/CVERecord?id=CVE-2022-31160
ubuntu.com/security/CVE-2021-41184
ubuntu.com/security/CVE-2016-7103
ubuntu.com/security/CVE-2021-41182
ubuntu.com/security/CVE-2021-41183