CVE-2019-11358: XSS in jQuery as used in Drupal, Backdrop CMS, and other products
Summary
CVE-2019-11358: XSS in jQuery as used in Drupal, Backdrop CMS, and other products. Affects jquery versions >= 1.1.4, < 3.4.0. Fixed in 3.4.0. How to fix ↓
Also tracked for
- django · PyPI
- mediawiki · Debian:11
- drupal/core · Packagist
The same CVE-2019-11358 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
jQuery is a popular JavaScript library used for simplifying HTML document traversal, event handling, and animation. It is widely utilized in various web development frameworks and content management systems, including Drupal and Backdrop CMS. This vulnerability affects versions of jQuery from 1.1.4 to 3.4.0. The vulnerability arises due to mishandling of the jQuery.extend(true, {}, ...) function, which can lead to Object.prototype pollution. If an unsanitized source object contains an enumerable __proto__ property, it can extend the native Object.prototype.
Vulnerability Detail
The vulnerability allows for potential cross-site scripting (XSS) attacks. By exploiting this issue, an attacker can inject malicious code into a web application, potentially compromising user data, executing arbitrary scripts, or performing other unauthorized actions. The impact of this vulnerability can vary depending on the specific implementation and usage of jQuery in the affected products.
How To Fix
Latest published version: 4.0.0 as of 23 Oct 2026
npm install jquery@4.0.0
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
3.4.0
This is the first release that contains the fix.
npm install jquery@3.4.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If updating to the patched version is not immediately feasible, a temporary workaround can be implemented by sanitizing the source objects before using jQuery.extend(true, {}, ...). This involves removing any enumerable __proto__ properties from the source object to prevent Object.prototype pollution. Here is an example of how to sanitize the source object in JavaScript:
const sanitizedSource = Object.fromEntries(
Object.entries(source).filter(([key]) => key !== '__proto__')
);
Conclusion
The vulnerability in jQuery versions 1.1.4 to 3.4.0 can lead to potential cross-site scripting (XSS) attacks. It is crucial for developers to update their jQuery library to version 3.4.0 or higher to mitigate this vulnerability. If immediate updating is not possible, sanitizing the source objects can serve as a temporary workaround. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for jquery →
FAQ
The vulnerability can lead to potential cross-site scripting (XSS) attacks, which can result in unauthorized access to user data, execution of malicious scripts, and other security breaches.
This vulnerability impacts various products that utilize vulnerable versions of the jQuery library, including Drupal, Backdrop CMS, and others.
To fix this vulnerability, it is recommended to update the jQuery library to version 3.4.0 or higher. Ensure that all instances of jQuery within your application are updated.
Yes, a temporary workaround involves sanitizing the source objects before using jQuery.extend(true, {}, ...) by removing any enumerable __proto__ properties.
You can find more information about this vulnerability, including technical details and affected package versions, in the vulnerability report available at Vulert: Vulert Scanner
References
Related vulnerabilities
Recent vulnerabilities recorded for jquery.