CVE-2021-41183
JSON

6.5medium

XSS in `*Text` options of the Datepicker widget

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
8.53% (higher than 95% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-j7qv-pgf6-hvh4BIT-DRUPAL-2021-41183

Description

jQuery-UI is the official jQuery user interface library. Prior to version 1.13.0, accepting the value of various `*Text` options of the Datepicker widget from untrusted sources may execute untrusted code. The issue is fixed in jQuery UI 1.13.0. The values passed to various `*Text` options are now always treated as pure text, not HTML. A workaround is to not accept the value of the `*Text` options from untrusted sources.

Affected

Product or packageVersionsReported by
jquery jquery-ui< 1.13.0CVE List
jquery-ui (npm)before 1.13.0GitHub Advisory Database
org.webjars.npm:jquery-ui (Maven)before 1.13.0GitHub Advisory Database
jquery-ui-rails (RubyGems)before 7.0.0GitHub Advisory Database
jQuery.UI.Combined (NuGet)before 1.13.0GitHub Advisory Database
jqueryui jquery_uibefore 1.13.0NVD
fedoraproject fedora33, 34, 35, 36NVD
netapp h300s_firmwareNot specifiedNVD
netapp h500s_firmwareNot specifiedNVD
netapp h700s_firmwareNot specifiedNVD
netapp h300e_firmwareNot specifiedNVD
netapp h500e_firmwareNot specifiedNVD

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD4.3medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:P/A:N
Bitnami Vulnerability Databasemedium rating

Classification

What each source says

CVE List

jQuery-UI is the official jQuery user interface library. Prior to version 1.13.0, accepting the value of various `*Text` options of the Datepicker widget from untrusted sources may execute untrusted code. The issue is fixed in jQuery UI 1.13.0. The values passed to various `*Text` options are now always treated as pure text, not HTML. A workaround is to not accept the value of the `*Text` options from untrusted sources.

GitHub Advisory Database
Impact

Accepting the value of various *Text options of the Datepicker widget from untrusted sources may execute untrusted code. For example, initializing the datepicker in the following way:

$( "#datepicker" ).datepicker( {
	showButtonPanel: true,
	showOn: "both",
	closeText: "<script>doEvilThing( 'closeText XSS' )</script>",
	currentText: "<script>doEvilThing( 'currentText XSS' )</script>",
	prevText: "<script>doEvilThing( 'prevText XSS' )</script>",
	nextText: "<script>doEvilThing( 'nextText XSS' )</script>",
	buttonText: "<script>doEvilThing( 'buttonText XSS' )</script>",
	appendText: "<script>doEvilThing( 'appendText XSS' )</script>",
} );

will call doEvilThing with 6 different parameters coming from all *Text options.

Patches

The issue is fixed in jQuery UI 1.13.0. The values passed to various *Text options are now always treated as pure text, not HTML.

Workarounds

A workaround is to not accept the value of the *Text options from untrusted sources.

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.

NVD (es)

jQuery-UI es la biblioteca oficial de interfaz de usuario de jQuery. Antes de la versión 1.13.0, aceptar el valor de varias opciones "*Text" del widget Datepicker desde fuentes no confiables podía ejecutar código no confiable. El problema es corregido en jQuery UI versión 1.13.0. Los valores pasados a varias opciones "*Text" son ahora tratados siempre como texto puro, no como HTML. Una solución es no aceptar el valor de las opciones "*Text" de fuentes no confiables

References

https://blog.jqueryui.com/2021/10/jquery-ui-1-13-0-released/advisory, release-notes, vendor-advisory
https://github.com/jquery/jquery-ui/security/advisories/GHSA-j7qv-pgf6-hvh4advisory, exploit, mitigation, third-party-advisory, web
https://github.com/jquery/jquery-ui/pull/1953advisory, patch, third-party-advisory, web
https://bugs.jqueryui.com/ticket/15284advisory, issue-tracking, vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/O74SXYY7RGXREQDQUDQD4BPJ4QQTD2XQ/advisory, mailing-list, third-party-advisory, vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SNXA7XRKGINWSUIPIZ6ZBCTV6N3KSHES/advisory, mailing-list, third-party-advisory, vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NXIUUBRVLA4E7G7MMIKCEN75YN7UFERW/advisory, mailing-list, third-party-advisory, vendor-advisory
https://lists.debian.org/debian-lts-announce/2022/01/msg00014.htmladvisory, mailing-list, third-party-advisory, web
https://www.drupal.org/sa-core-2022-002advisory, third-party-advisory, web
https://www.oracle.com/security-alerts/cpuapr2022.htmladvisory, patch, third-party-advisory, web
https://security.netapp.com/advisory/ntap-20211118-0004/advisory, third-party-advisory
https://www.drupal.org/sa-contrib-2022-004advisory, third-party-advisory, web

Sources

SourceRecordLicence
CVE ListCVE-2021-41183 changed 2025-02-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-j7qv-pgf6-hvh4 changed 2026-07-08CC-BY-4.0
NVDCVE-2021-41183 changed 2026-08-25Public domain
Bitnami Vulnerability DatabaseBIT-DRUPAL-2021-41183 changed 2026-09-08Apache-2.0