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)
| Artifact | Affected versions | Fixed 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
57% of the dependent artifacts (717) still pull an affected version in their latest release.
| Depth | Dependent 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
- org.webjars » bootstrap474 usages
- io.get-coursier » coursier142 usages
- be.doeraene » scalajs-jquery113 usages
- org.xwiki.platform » xwiki-platform-test-docker101 usages
- org.webjars » jquery-ui98 usages
- org.fenixedu » bennu-core96 usages
- de.tudarmstadt.ukp.inception.app » inception-model90 usages
- de.tudarmstadt.ukp.inception.app » inception-support87 usages
- org.xwiki.platform » xwiki-platform-tool-packager-plugin77 usages
- de.tudarmstadt.ukp.inception.app » inception-api76 usages
- org.xwiki.platform » xwiki-platform-administration-ui75 usages
- com.haulmont.cuba » cuba-web71 usages
- de.agilecoders.wicket » wicket-bootstrap-core70 usages
- org.carewebframework » org.carewebframework.shell70 usages
- org.xwiki.platform » xwiki-platform-panels-ui62 usages
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
