Skip to content

Commit

Permalink
fix: prototype pollution vulnerability in extend (CVE-2024-45435)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersk committed Oct 2, 2024
1 parent 1067900 commit 4801823
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/extend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export function extend(target: any = {}, ...sources: any[]) {
for (let i = 0; i < sources.length; i++) {
const source = sources[i];
for (const prop in source) {
if (prop === '__proto__' || prop === 'constructor') {
continue;
}
const sourceProp = source[prop];
if (
typeof sourceProp === 'object' &&
Expand Down

0 comments on commit 4801823

Please sign in to comment.