I have been working on input validation vulnerabilities and very new to Uncontrolled Format String Vulnerabilities, as I learned so far its usually exploited through printf
functions with "%
".
I also saw that JavaScript (Node.JS) supports format strings by using sprintf
functions.
Is it possible to perform Format String attacks in JavaScript, because in CWE it is only mentioned that it is rarely seen in Perl, oftenly in C and C++. If it is possible are there any examples or any source that I can find.
I tried myself with a simple example but it end up with an error expecting number but found string "Bob"
var val = "Bob"
console.log(sprintf('The %x ran around the tree', val));
I am not sure if I am doing it right, any help would be great.
Thanks in advance