# CVE-2020-11022: jQuery XSS in DOM manipulation methods

Source: https://junglewise.ai/threats/cve-2020-11022-jquery-xss-in-dom-manipulation-methods  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-04-29. Updated: 2026-05-10  
License: CC BY 4.0 with a link back

CVE-2020-11022 · Severity: medium · CVSS 6.9 · Published 2020-04-29

jQuery is a widely used JavaScript library that helps websites display and manipulate content. A security flaw exists where the library may accidentally execute malicious code when processing web content from untrusted sources, even if that content was previously cleaned. This could allow an attacker to steal user session information or perform unauthorized actions on behalf of a visitor to a vulnerable website.

Technologies: [org.webjars.npm:jquery (Maven)](https://junglewise.ai/threats/technologies/org-webjars-npm-jquery), [jquery-rails (RubyGems)](https://junglewise.ai/threats/technologies/jquery-rails). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven), [Packagist](https://junglewise.ai/threats/vendors/packagist), [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2020-11022 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2020-11022 being exploited in the wild.

**How severe is CVE-2020-11022?** Medium severity, with a CVSS score of 6.9, published 29 April 2020.

**Which products and versions are affected?** org.webjars.npm:jquery (Maven) >= 1.12.0, < 3.5.0, ECOSYSTEM:introduced=1.12.0,fixed=3.5.0; Maxime Bouroumeau-Fuseau Debugbar < 1.19.0; athlon1600/youtube-downloader (Packagist) <= 4.0.0; components/jquery (Packagist) >= 1.12.0, < 3.5.0; and 2 more.

**Is there a fix for CVE-2020-11022?** Yes. org.webjars.npm:jquery (Maven): upgrade to 3.5.0 or later; jquery-rails (RubyGems): upgrade to 4.4.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2020-11022 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2020-11022?** Check whether you run org.webjars.npm:jquery (Maven), Maxime Bouroumeau-Fuseau Debugbar, athlon1600/youtube-downloader (Packagist) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- org.webjars.npm:jquery (Maven): upgrade to 3.5.0 or later

  ```sh
  # set org.webjars.npm:jquery to 3.5.0 in your pom.xml or build.gradle
  ```

- jquery-rails (RubyGems): upgrade to 4.4.0 or later

  ```sh
  bundle update jquery-rails
  ```


## Technical details

A Cross-Site Scripting (XSS) vulnerability exists in jQuery's DOM manipulation methods, such as .html() and .append(). The issue stems from how jQuery handles HTML strings containing certain tags, which can bypass sanitization logic when processed through jQuery's internal pre-filtering mechanisms. An attacker can exploit this by providing specially crafted HTML that, when passed to these methods, executes arbitrary JavaScript in the context of the victim's browser. This vulnerability is tracked as CVE-2020-11022 and is resolved in jQuery version 3.5.0. A workaround is available for older versions (1.12/2.2+) by overriding jQuery.htmlPrefilter to return the input unchanged.

## Affected products

- jquery jquery >= 1.12.0, < 3.5.0
- rubysec jquery-rails < 4.4.0
- maximebf debugbar < 1.19.0

## Identifiers

- CVE-2020-11022
- GHSA-gxr4-xjj5-5px2

## Timeline

- 2020-04-10: patched: jQuery 3.5.0 released
- 2020-04-29: disclosed: GitHub Advisory published

## References

- [https://api.github.com/users/masatokinugawa](https://api.github.com/users/masatokinugawa)
- [https://github.com/masatokinugawa](https://github.com/masatokinugawa)
- [https://api.github.com/users/masatokinugawa/gists%7B/gist_id%7D](https://api.github.com/users/masatokinugawa/gists%7B/gist_id%7D)
- [https://api.github.com/users/masatokinugawa/repos](https://api.github.com/users/masatokinugawa/repos)
- [https://avatars.githubusercontent.com/u/1499192?v=4](https://avatars.githubusercontent.com/u/1499192?v=4)
- [https://api.github.com/users/masatokinugawa/events%7B/privacy%7D](https://api.github.com/users/masatokinugawa/events%7B/privacy%7D)

## Related threats

- [jQuery Cross Site Scripting in htmlPrefilter](https://junglewise.ai/threats/jquery-cross-site-scripting-in-htmlprefilter-9649f1a0)
- [jQuery Cross-Site Scripting in location.hash element selection](https://junglewise.ai/threats/cve-2011-4969-jquery-cross-site-scripting-in-location-hash-element-selection)
- [jQuery Cross-Site Scripting in main jQuery function](https://junglewise.ai/threats/cve-2012-6708-jquery-cross-site-scripting-in-main-jquery-function)
- [jQuery cross-site scripting in load method](https://junglewise.ai/threats/cve-2020-7656-jquery-cross-site-scripting-in-load-method)
- [jQuery DOM manipulation XSS via option elements](https://junglewise.ai/threats/cve-2020-11023-jquery-cross-site-scripting-xss-vulnerability)
