GitHub Advisoryadvisory · npm, RubyGems, NuGet, Maven, Packagist

GHSA-jpcq-cgw6-v4j6 Potential XSS vulnerability in jQuery

MEDIUM Published 2020-04-29 Modified 2025-10-22 Official page ↗
Aliases
CVE-2020-11023
Ecosystem
npm, RubyGems, NuGet, Maven, Packagist
Packages
jquery, jquery-rails, jQuery, org.webjars.npm:jquery, components/jquery
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N/E:H
Weaknesses
CWE-79
Reviewed
2020-04-29

Affected packages

• npm jquery: >= 1.0.3, < 3.5.0 → fixed in 3.5.0 • RubyGems jquery-rails: < 4.4.0 → fixed in 4.4.0 • NuGet jQuery: >= 1.0.3, < 3.5.0 → fixed in 3.5.0 • Maven org.webjars.npm:jquery: >= 1.0.3, < 3.5.0 → fixed in 3.5.0 • Packagist components/jquery: >= 1.0.3, < 3.5.0 → fixed in 3.5.0

Description

Impact Passing HTML containing `` 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.

Related

Alias · CVE (1)

  • CVE-2020-11023 In jQuery versions greater than or equal to 1.0.3 and before 3.5.0, passing HTML containing <option> elements from untrusted sources - even… vulnerability

Weakness · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References