Vulnerability in jquery package - Regression Update
Summary
DLA-1777-2: jquery - regression update. Affects jquery versions < 1.7.2+dfsg-3.2+deb8u7. Fixed in 1.7.2+dfsg-3.2+deb8u7. How to fix ↓
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
The jquery package is a popular JavaScript library that simplifies HTML document traversal, event handling, and animation. It is widely used in web development to enhance the functionality and interactivity of websites. However, a vulnerability has been discovered in the package that affects its extend method when used with unsanitized source objects containing an enumerable proto property. This vulnerability can lead to Object.prototype pollution, allowing an attacker to extend the native Object.prototype. This issue was reported in the Drupal CMS and further details can be found in the upstream advisory at https://www.drupal.org/sa-core-2019-006.
Vulnerability Detail
The vulnerability in the jquery package arises due to mishandling of the extend method. When the method is used with an unsanitized source object that contains an enumerable proto property, it can result in Object.prototype pollution. This means that if an attacker can control the source object, they can modify the behavior of all JavaScript objects in the application, potentially leading to security vulnerabilities or unexpected behavior. It is important to note that this vulnerability only affects applications that use the extend method with unsanitized user input.
How To Fix
Minimum fixed version
1.7.2+dfsg-3.2+deb8u7
This is the first release that contains the fix.
sudo apt-get install --only-upgrade jquery
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading the jquery package is not immediately feasible, a possible workaround is to sanitize the source object before using it with the extend method. This can be done by removing any enumerable proto properties from the object. 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 jquery package is vulnerable to a regression issue that can result in Object.prototype pollution. To mitigate this vulnerability, it is recommended to upgrade to version 1.7.2+dfsg-3.2+deb8u6 or later. If immediate upgrade is not possible, sanitizing the source object before using the extend method can serve as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for jquery →
FAQ
The vulnerability allows an attacker to modify the behavior of all JavaScript objects in the application by extending the native Object.prototype. This can lead to security vulnerabilities or unexpected behavior.
The vulnerability affects versions of the jquery package up to and including 1.7.2+dfsg-3.2+deb8u6.
No, this vulnerability is not specific to any particular operating system. However, the fix for this vulnerability is available for Debian 8 Jessie.
At the time of this report, there are no known exploits for this vulnerability. However, it is important to apply the fix as soon as possible to prevent any potential exploitation.
You can find more information about this vulnerability in the upstream advisory at https://www.drupal.org/sa-core-2019-006.
Related vulnerabilities
Recent vulnerabilities recorded for jquery.