Skip to content

Commit 6671f0f

Browse files
committed
Fix Prototype Pollution vulnerability (CVE-2023-26102)
1 parent 8aea7eb commit 6671f0f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/rangy-core.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@
158158
util.extend = extend = function(obj, props, deep) {
159159
var o, p;
160160
for (var i in props) {
161+
if (i === "__proto__" || i === "constructor" || i === "prototype") {
162+
continue;
163+
}
161164
if (props.hasOwnProperty(i)) {
162165
o = obj[i];
163166
p = props[i];
@@ -3893,4 +3896,4 @@
38933896
}
38943897

38953898
return api;
3896-
}, this);
3899+
}, this);

0 commit comments

Comments
 (0)