Skip to main content

CVE-2020-11022 — Potential XSS vulnerability in components/jquery

MEDIUM

Potential XSS vulnerability in jQuery

Published April 29, 2020Updated September 10, 2026Source: OSV

What Should I Do?

Fix in Your Next Sprint

This vulnerability has a 99.22% chance of being exploited within 30 days.

Does your project use an affected components/jquery version?

Paste your composer.lock to check it for CVE-2020-11022 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my composer.lock

Summary

Impact

Passing HTML from untrusted sources - even after sanitizing it - 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 the issue without upgrading, adding the following to your code:

jQuery.htmlPrefilter = function( html ) {
	return html;
};

You need to use at least jQuery 1.12/2.2 or newer to be able to apply this workaround.

References

https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/ https://jquery.com/upgrade-guide/3.5/

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.

Advisory Timeline

  • First published April 29, 2020 (2403 days ago).
  • Last revised September 10, 2026 — 2324 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update components/jquery to 3.5.0 or later
composer require "components/jquery:^3.5.0"
npm
Update jquery to 3.5.0 or later
npm install jquery@3.5.0
Maven
Update org.webjars.npm:jquery to 3.5.0 or later
<!-- Update pom.xml dependency version to 3.5.0 for org.webjars.npm:jquery -->
Bundler
Update jquery-rails to 4.4.0 or later
gem install jquery-rails -v 4.4.0
NuGet
Update jquery to 3.5.0 or later
dotnet add package jquery --version 3.5.0
Composer
Update athlon1600/youtube-downloader to 4.0.1 or later
composer require "athlon1600/youtube-downloader:^4.0.1"
Composer
Update maximebf/debugbar to 1.19.0 or later
composer require "maximebf/debugbar:^1.19.0"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (7)

Affects 5 ecosystems: Packagist (3), Maven (1), npm (1), NuGet (1), RubyGems (1).

PackageFixed In
components/jquery Packagist · Affected: 1.12.0, 1.12.1, 1.12.4, 2.0.0 (+17 more)3.5.0
jquery npm · Affected: All versions3.5.0
org.webjars.npm:jquery Maven · Affected: 1.12.1, 1.12.2, 1.12.3, 1.12.4 (+23 more)3.5.0
jquery-rails RubyGems · Affected: 0.1.1, 0.1.2, 0.1.3, 0.2 (+70 more)4.4.0
jquery NuGet · Affected: 1.12.0, 1.12.1, 1.12.2, 1.12.3 (+24 more)3.5.0
athlon1600/youtube-downloader Packagist · Affected: v1.0.0, v1.0.1, v2.0.0, v2.0.1 (+18 more)4.0.1
maximebf/debugbar Packagist · Affected: 1.0, 1.0.1, 1.0.2, 1.0.3 (+56 more)1.19.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.9 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N

References

Frequently Asked Questions

What is CVE-2020-11022?
Potential XSS vulnerability in jQuery. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.9/10).
How do I check if my project is affected by CVE-2020-11022?
CVE-2020-11022 affects components/jquery, jquery and org.webjars.npm:jquery (and 3 more). It has a 99.2% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2020-11022 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.9

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
99.22%
EPSS percentile: 100

This places it in the top 5% of EPSS-scored vulnerabilities — 100% of tracked vulnerabilities score at or below it, so it is far more likely to be exploited than nearly all other tracked vulnerabilities.

Also Known As

GHSA-gxr4-xjj5-5px2
BIT-drupal-2020-11022

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock