Skip to content

Commit da78a8f

Browse files
ENGCOM-4804: Patch the prototype pollution vulnerability in jQuery < 3.4.0 #22418
- Merge Pull Request #22418 from DanielRuf/magento2:security/jquery-patch-prototype-pollution-vulnerability - Merged commits: 1. fe2d6a6
2 parents f7cc333 + fe2d6a6 commit da78a8f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/web/jquery.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
* Date: 2016-05-20T17:17Z
1313
*/
1414

15+
/*
16+
* includes patch for CVE-2019-11358
17+
* prototype pollution vulnerability in jQuery before 3.4.0
18+
*/
19+
1520
(function( global, factory ) {
1621

1722
if ( typeof module === "object" && typeof module.exports === "object" ) {
@@ -209,8 +214,9 @@
209214
src = target[ name ];
210215
copy = options[ name ];
211216

217+
// Prevent Object.prototype pollution
212218
// Prevent never-ending loop
213-
if ( target === copy ) {
219+
if ( name === "__proto__" || target === copy ) {
214220
continue;
215221
}
216222

0 commit comments

Comments
 (0)