# CVE-2020-11023: jQuery DOM manipulation XSS via option elements

Source: https://junglewise.ai/threats/cve-2020-11023-jquery-cross-site-scripting-xss-vulnerability  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-04-29. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2020-11023 · Severity: critical · CVSS 3.1 · Exploited in the wild · Published 2020-04-29

jQuery is a widely-used JavaScript library for manipulating web page content. A flaw in its HTML handling allows attackers to inject malicious code when untrusted HTML containing option elements is inserted into web pages using jQuery methods like .html() or .append(). This could lead to session hijacking, credential theft, or other account compromise on affected websites.

Technologies: [jQuery](https://junglewise.ai/threats/technologies/jquery), [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: [jQuery](https://junglewise.ai/threats/vendors/jquery), [Maven](https://junglewise.ai/threats/vendors/maven), [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2020-11023 exploited in the wild?** Yes. CVE-2020-11023 is known to be exploited in the wild, first recorded on 23 January 2025. Treat it as urgent.

**How severe is CVE-2020-11023?** Critical severity, with a CVSS score of 3.1, published 29 April 2020.

**Which products and versions are affected?** jQuery 1.0.3 through 3.4.x; org.webjars.npm:jquery (Maven) ECOSYSTEM:introduced=1.0.3,fixed=3.5.0; jquery-rails (RubyGems) ECOSYSTEM:introduced=0,fixed=4.4.0.

**Is there a fix for CVE-2020-11023?** 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-11023 attacked?** It is attacked over the network.

**Am I affected by CVE-2020-11023?** Check whether you run jQuery, org.webjars.npm:jquery (Maven) or jquery-rails (RubyGems) 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

jQuery versions 1.0.3 through 3.4.x contain a cross-site scripting (XSS) vulnerability in their DOM manipulation methods (.html(), .append(), and related functions). The vulnerability exists because jQuery does not properly sanitize HTML containing &lt;option&gt; elements before inserting them into the DOM. An attacker can pass malicious HTML from an untrusted source (even if it has been sanitized by other tools) to trigger script execution. The attack requires user interaction (the attacker must control the HTML passed to the jQuery method) but can execute with network reachability. The vulnerability is patched in jQuery 3.5.0; users without immediate access to patching can use DOMPurify with the SAFE_FOR_JQUERY option as a workaround.

## Affected products

- jQuery jQuery 1.0.3 through 3.4.x

## Identifiers

- CVE-2020-11023
- GHSA-jpcq-cgw6-v4j6

## Timeline

- 2020-04-29: disclosed
- 2020-04-10: patched: jQuery 3.5.0 released

## References

- [https://github.com/jquery/jquery/security/advisories/GHSA-jpcq-cgw6-v4j6](https://github.com/jquery/jquery/security/advisories/GHSA-jpcq-cgw6-v4j6)

## 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 XSS in DOM manipulation methods](https://junglewise.ai/threats/cve-2020-11022-jquery-xss-in-dom-manipulation-methods)
