CVE-2020-11023 Overview
CVE-2020-11023 is a Cross-Site Scripting (XSS) vulnerability affecting jQuery versions 1.0.3 through 3.4.x. The flaw exists in jQuery's DOM manipulation methods, where passing HTML containing <option> elements from untrusted sources—even after sanitizing—to methods such as .html(), .append(), and similar functions may result in the execution of untrusted JavaScript code. This vulnerability has been added to CISA's Known Exploited Vulnerabilities (KEV) catalog, indicating active exploitation in the wild.
Critical Impact
This vulnerability enables attackers to execute arbitrary JavaScript in users' browsers through specially crafted HTML containing malicious option elements, potentially leading to session hijacking, credential theft, and defacement of web applications.
Affected Products
- jQuery versions >= 1.0.3 and < 3.5.0
- Drupal (multiple versions)
- Oracle WebLogic Server, Application Express, and numerous Oracle products
- Debian Linux 9.0
- Fedora 31, 32, 33
- NetApp Active IQ Unified Manager, SnapCenter Server, and related products
- Tenable Log Correlation Engine
Discovery Timeline
- 2020-04-10 - jQuery releases version 3.5.0 with security patch
- 2020-04-29 - CVE-2020-11023 published to NVD
- 2025-11-07 - Last updated in NVD database
Technical Details for CVE-2020-11023
Vulnerability Analysis
This vulnerability stems from jQuery's HTML parsing behavior when processing <option> elements within DOM manipulation methods. When untrusted HTML content containing specially crafted <option> tags is passed to jQuery methods like .html(), .append(), .prepend(), .before(), .after(), or .replaceWith(), the library fails to properly sanitize embedded script content.
The exploitation requires user interaction, as an attacker must convince a victim to visit a page containing malicious content or trigger the vulnerable code path. Upon successful exploitation, attackers can execute arbitrary JavaScript within the context of the victim's browser session, enabling theft of session cookies, credential harvesting, keylogging, or redirecting users to malicious sites.
The vulnerability is particularly concerning because standard HTML sanitization libraries may not properly handle the specific parsing quirks that jQuery exhibits with <option> elements. This means applications that believe they have adequately sanitized user input may still be vulnerable if they subsequently pass that content to jQuery DOM manipulation functions.
Root Cause
The root cause lies in jQuery's internal HTML parsing logic, specifically in how the library handles <option> elements during DOM manipulation operations. jQuery's parsing mechanism did not adequately account for edge cases where script execution could occur through crafted option element attributes or nested content. The parser failed to apply consistent sanitization rules when option elements were processed, creating an execution pathway for malicious scripts.
Attack Vector
The attack is network-based and requires user interaction. An attacker crafts malicious HTML containing <option> elements with embedded JavaScript payloads. When this content is processed by a vulnerable jQuery method on a victim's browser, the JavaScript executes within the security context of the hosting domain.
Attack scenarios include:
- Injecting malicious content through user-controlled input fields that are later rendered using jQuery
- Exploiting third-party widgets or plugins that use jQuery to process external data
- Leveraging stored XSS attacks where malicious content persists in a database and is rendered to multiple users
The vulnerability exploits jQuery's DOM manipulation by embedding malicious script content within option element structures that bypass typical sanitization. Attackers can leverage this to steal session tokens, perform actions on behalf of authenticated users, or redirect victims to phishing sites. Detailed technical information is available in the GitHub jQuery Security Advisory.
Detection Methods for CVE-2020-11023
Indicators of Compromise
- Unexpected JavaScript execution originating from HTML content containing <option> elements
- Suspicious network requests to external domains from client-side JavaScript that should not make such calls
- Anomalous user session activity including unexpected password changes or account modifications
- Browser console errors or warnings related to script execution from dynamically inserted content
Detection Strategies
- Implement Content Security Policy (CSP) headers to detect and block inline script execution attempts
- Deploy web application firewalls (WAF) with rules to identify XSS patterns in option elements
- Use browser-based XSS auditing tools to identify potential exploitation attempts in real-time
- Review application logs for unusual patterns in user-generated content submissions containing HTML
Monitoring Recommendations
- Monitor client-side JavaScript errors and exceptions for signs of exploitation attempts
- Track changes to session cookies and authentication tokens for signs of session hijacking
- Implement real-time alerting on CSP violation reports indicating blocked script execution
- Audit third-party JavaScript dependencies for vulnerable jQuery versions using software composition analysis tools
How to Mitigate CVE-2020-11023
Immediate Actions Required
- Upgrade jQuery to version 3.5.0 or later across all applications and dependencies
- Audit all application code for usage of jQuery DOM manipulation methods with user-controlled input
- Implement strict Content Security Policy headers to mitigate XSS impact
- Review and update any third-party plugins or libraries that bundle vulnerable jQuery versions
Patch Information
jQuery version 3.5.0, released on April 10, 2020, contains the fix for this vulnerability. The patch modifies jQuery's HTML parsing logic to properly sanitize <option> elements and prevent script execution through this vector. Organizations should upgrade to jQuery 3.5.0 or later to remediate this vulnerability. For detailed upgrade instructions, see the jQuery Upgrade Guide to 3.5.
Vendors of affected products have released their own security patches:
- Drupal Security Advisory SA-CORE-2020-002
- Oracle Security Alerts (multiple quarterly updates)
- Debian Security Advisory DSA-4693
- NetApp Security Advisory NTAP-20200511-0006
Workarounds
- Use jQuery's .text() method instead of .html() when inserting user-controlled content that should not contain HTML
- Implement server-side HTML sanitization using libraries like DOMPurify before passing content to jQuery methods
- Apply input validation to reject or encode HTML option elements in user-supplied data
- Consider using template literals or DOM APIs that automatically escape content instead of jQuery DOM manipulation
# Check jQuery version in your project dependencies
npm list jquery
# or
yarn list jquery
# Upgrade jQuery to patched version
npm update jquery@^3.5.0
# or
yarn upgrade jquery@^3.5.0
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


