MODERATE 6.9

CVE-2020-11022

Potential XSS vulnerability in jQuery

Description

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.

Affected Maven artifacts (3)

ArtifactAffected versionsFixed in
org.webjars.npm » jquery
>= 1.12.0, < 3.5.0
3.5.0
org.mvnpm » jqueryvia npm jquery
>= 1.12.0, < 3.5.0
3.5.0
org.webjars » jqueryvia npm jquery
>= 1.12.0, < 3.5.0
3.5.0
org.webjars.npm » jqueryvia npm jquery
>= 1.12.0, < 3.5.0
3.5.0

Blast radius

3affected artifacts
70affected versions
1,257dependent artifacts (est.)
36,589dependent versions

57% of the dependent artifacts (717) still pull an affected version in their latest release.

DepthDependent versions
Direct
6,195
2 hops
13,964
3 hops
8,395
4 hops
6,731
5 hops
1,057
6 hops
247

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.

Other ecosystems

Also affects Packagist (3 packages) npm (1 package) NuGet (1 package) RubyGems (1 package) . See all on OSV

References

Advisorynvd.nist.gov
Packagegithub.com
Webgithub.com
Webgithub.com
Webgithub.com
Webgithub.com
Webblog.jquery.com
Weblists.fedoraproject.org
Weblists.opensuse.org
Weblists.opensuse.org
Weblists.opensuse.org
Webpacketstormsecurity.com
Websecurity.gentoo.org
Webdebian.org
Webdrupal.org
Weboracle.com
Weboracle.com
Weboracle.com
Weboracle.com
Weboracle.com
Weboracle.com
Weboracle.com
Weboracle.com
Weboracle.com
Webtenable.com
Webtenable.com
Webtenable.com
Webtenable.com
Webgithub.com
Webgithub.com
Webgithub.com
Webjquery.com
Weblists.apache.org
Weblists.apache.org
Weblists.apache.org
Weblists.apache.org
Weblists.apache.org
Weblists.apache.org
Weblists.apache.org
Weblists.apache.org