You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As many security vulnerability has been raised for prototype pollution, this is an important note that the following code is not the security vulnerability
2
+
3
+
```js
4
+
const { XMLParser } =require("fast-xml-parser");
5
+
6
+
constxml=`<root>
7
+
<constructor>pwned</constructor>
8
+
</root>`;
9
+
10
+
constparser=newXMLParser();
11
+
constresult=parser.parse(xml);
12
+
13
+
constrootObj=result.root;
14
+
console.log(rootObj.constructor); // "pwned" (should be [Function: Object])
0 commit comments