CVE-2022-31160
jQuery UI vulnerable to XSS when refreshing a checkboxradio with an HTML-like initial text label
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`.
How to fix CVE-2022-31160
To remediate CVE-2022-31160, upgrade the affected package to a fixed version below.
- —upgrade to 1.12.1+dfsg-8+deb11u2 or later
- —upgrade to 1.13.2 or later
- —upgrade to 1.13.2 or later
- —upgrade to 1.13.2 or later
- —upgrade to 8.0.0 or later
Is CVE-2022-31160 being exploited?
Moderate — EPSS is 7.8%. Track this CVE but it's not at the top of the prioritisation list.
Affected packages (5)
- from 0, < 1.12.1+dfsg-8+deb11u2
- from 0, < 1.13.2
- from 0, < 1.13.2
- from 0, < 1.13.2
- from 0, < 8.0.0
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | MEDIUM6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |