Every CVE Search/ Get API key

CVE-2022-31160

jQuery UI contains potential XSS vulnerability when refreshing a checkboxradio with an HTML-like initial text label

6.1 MediumPublic exploitFix available

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

2.69%Up 1.8 points since Jul 21, 2022
90%50%10%1%

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 MediumCVSS: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 MediumCVSS: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">
	&lt;img src=x onerror="alert(1)"&gt;
</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>&lt;img src=x onerror="alert(1)"&gt;</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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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">
	&lt;img src=x onerror="alert(1)"&gt;
</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>&lt;img src=x onerror="alert(1)"&gt;</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 MediumCVSS: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 MediumCVSS: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

Affected packages
PackageAffectedFixed
jquery-ui
npm
before 1.13.2
1.13.2
org.webjars.npm:jquery-ui
Maven
before 1.13.2
1.13.2
jQuery.UI.Combined
NuGet
before 1.13.2
1.13.2
jquery-ui-rails
RubyGems
before 8.0.0
8.0.0
jquery-ui
TuxCare: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-ui
TuxCare: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
jqueryui
Debian:12
before 1.13.2+dfsg-1
1.13.2+dfsg-1
jqueryui
Debian:13
before 1.13.2+dfsg-1
1.13.2+dfsg-1
jqueryui
Debian:14
before 1.13.2+dfsg-1
1.13.2+dfsg-1
jqueryui
Debian: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
Affected packages
PackageAffectedFixed
org.webjars.npm:jquery-ui
Maven
before 1.13.2, plus listed versions
1.10.41.10.51.12.01.12.0-rc.21.12.1
Show 4 moreShow less
1.13.01.13.0-rc.21.13.0-rc.31.13.1
1.13.2
jquery-ui-rails
RubyGems
before 8.0.0, plus listed versions
0.0.10.0.20.1.00.2.00.2.1
Show 33 moreShow less
0.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.Combined
NuGet
before 1.13.2, plus listed versions
1.10.01.10.11.10.21.10.31.10.4
Show 30 moreShow less
1.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
jqueryui
Ubuntu: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
jqueryui
Ubuntu: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
jqueryui
Ubuntu: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
jqueryui
Ubuntu: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
jqueryui
Ubuntu: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
jqueryui
Ubuntu: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
jqueryui
Ubuntu: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
jqueryui
Ubuntu: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
jqueryui
Ubuntu: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
jqueryui
Ubuntu: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
jqueryui
Ubuntu: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.

Public exploits
SourceLinkDate
PoC in GitHubCyberOne-TeamARES/jquery-cve-2022-311602025-08-12

History

History
RecordedChangedSources
affected, factsOSV
first indexedCVE 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

Show 22 moreShow less
MoveEnter Open