The exploit is mentioned here: https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/

And is addressed for Drupal core here: https://www.drupal.org/sa-core-2019-006

Individual patches for jquery versions are here: https://github.com/DanielRuf/snyk-js-jquery-174006?files=1

We've bumped up to 1.12.4 and patched that specific version on our end so I'll add the resulting patch in a comment that follows.

Comments

Mirabuck created an issue. See original summary.

mirabuck’s picture

StatusFileSize
new126.85 KB

Here's a patch for 1.12.4.

mirabuck’s picture

Issue summary: View changes
mirabuck’s picture

Title: Where possible, jquery versions should be patched to address recent jquery explot » Where possible, jquery versions should be patched to address recent jquery exploit
gobinathm’s picture

Status: Active » Reviewed & tested by the community

Manually Test This Path & it works fine.

lanny heidbreder’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new3.87 MB

Here's a patch with all included jQuery versions patched. The tools jQuery used to minify itself in the old days no longer exist, so I compiled everything with CodeKit and copy/pasted the copyright lines from the old versions. This is entirely untested and needs to be put through its paces with all included versions.

chaseontheweb’s picture

Per @dolu on #3049071: Patch local versions of jquery? (Minor vulnerability fix):

That's what I thought initially, but using Drupal 7.66 will fix the vulnerability.
There's a new file that will override jquery's extend() function.

See: https://git.drupalcode.org/project/drupal/commit/39e2971

* This provides the Object.prototype pollution vulnerability fix to Drupal
* installations running older jQuery versions, including the versions shipped
* with Drupal core and https://www.drupal.org/project/jquery_update.

The patch is still needed for people that are not upgrading to 7.66

samcohen’s picture

If you use the CDN version of JQuery is the patch still necessary?

chaseontheweb’s picture

Looking at misc/jquery-extend-3.4.0.js, any version of jQuery < 3.4.0 that uses a global object named jQuery (probably 99.9% of use cases), should get its extend method modified by the core patch, whether core's, jquery_update, or otherwise (as long as the patch loads after jQuery, which is definitely true for core and jquery_update).

If you'd like to confirm that you are patched, you can run this test code in your browser's developer tools while on your site:

jQuery.extend(true, {},
  JSON.parse('{"__proto__": {"test": true}}')
);
console.log( "test" in {} );

Output will be false if patched, true if not patched.

mirabuck’s picture

Status: Needs review » Closed (won't fix)

Closing this as won't fix given that the core patch does actually cover the jquery update circumstance.