Advisory

GHSA-jpcq-cgw6-v4j6

Also known as: BIT-drupal-2020-11023, CVE-2020-11023

Summary

Potential XSS vulnerability in jQuery

Details

Impact
Passing HTML containing <option> elements from untrusted sources - even after sanitizing them - to one of jQuery's DOM manipulation methods (i.e. .html(), .append(), and others) may execute untrusted code.

Patches
This problem is patched in jQuery 3.5.0.

Workarounds
To workaround this issue without upgrading, use DOMPurify with its SAFE_FOR_JQUERY option to sanitize the HTML string before passing it to a jQuery method.

References
https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/

For more information
If you have any questions or comments about this advisory, search for a relevant issue in the jQuery repo. If you don't find an answer, open a new issue.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2020-04-29 22:19 UTC
Modified
2026-09-10 03:48 UTC

Affected packages and fixes

jquery

npm · All systems

Affected

  • introduced 1.0.3, fixed 3.5.0 (semver)

Fixed versions

3.5.0

Fix

jquery-rails

RubyGems · All systems

Affected

  • introduced 0, fixed 4.4.0 (ecosystem)

Fixed versions

4.4.0

Fix

The export has no generic command for this ecosystem.

jQuery

NuGet · All systems

Affected

  • introduced 1.0.3, fixed 3.5.0 (ecosystem)

Fixed versions

3.5.0

Fix

The export has no generic command for this ecosystem.

components/jquery

Packagist · All systems

Affected

  • introduced 1.0.3, fixed 3.5.0 (ecosystem)

Fixed versions

3.5.0

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences