Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Remediate medium vulnerability for jQuery #2911

Merged

Conversation

johnnyporkchops
Copy link
Contributor

@johnnyporkchops johnnyporkchops commented May 21, 2019

Summary:

Snyk medium level vulnerability for jQuery javascript library that makes the application vulnerable to prototype pollution which could lead to denial of service (breaking code) or remote code execution.

Snyk report: https://app.snyk.io/vuln/SNYK-JS-JQUERY-174006

Introduced through: [email protected]:
As of jQuery3.0.0, the extend function can be tricked into modifying the prototype of Object when the attacker controls part of the structure passed to this function. This can let an attacker add or modify an existing property that will then exist on all objects, not just the one being referenced via extend().

Remediation: Upgrade to [email protected]:
jQuery 3.4.0 includes a fix for some unintended behavior when using jQuery.extend(true, {}, ...). If an unsanitized source object contained an enumerable proto property, it could extend the native Object.prototype. This fix is included in jQuery 3.4.0 ( patch diffs exist to patch previous jQuery versions)
Source: see Minor vulnerability fix: Object.prototype pollution here:: https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/

Impacted areas of the application

Upgraded jQuery from 3.2.3 to 3.4.1
modified: ../package-lock.json
modified: ../package.json

Note: Generally in our JS modules, we use the Underscore library's ._extend() convenience function which has been replaced in some places with native ES6 Object​.assign(). However, jQuery's $.extend is commonly used in jQuery Plugin development and is found in our calendar and dropdown menu code for example.

@johnnyporkchops johnnyporkchops changed the title Remediate Snyk-reported vulnerability for jQuery [Snyk] 2823/remediate-reported vulnerability for jQuery May 22, 2019
@johnnyporkchops johnnyporkchops changed the title [Snyk] 2823/remediate-reported vulnerability for jQuery [Snyk] 2823/remediate medium vulnerability for jQuery May 22, 2019
@johnnyporkchops johnnyporkchops changed the title [Snyk] 2823/remediate medium vulnerability for jQuery [Snyk] Remediate medium vulnerability for jQuery May 22, 2019
@dorothyyeager dorothyyeager requested a review from patphongs May 24, 2019 14:38
Copy link
Member

@patphongs patphongs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@patphongs patphongs merged commit a2aee32 into develop May 28, 2019
@lbeaufort lbeaufort deleted the feature/2823-snyk-alvulnerability-prototype-pollution branch June 21, 2019 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Med] Snyk: Prototype Pollution (due 6/10/19)
2 participants