Skip to content

Commit fe2d6a6

Browse files
DanielRufDaniel Ruf
authored andcommitted
Patch the prototype pollution vulnerability in jQuery < 3.4.0 (CVE-2019-11358)
1 parent e05cfbe commit fe2d6a6

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)