We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Due to the using of /bin/sh -c blablabla... it can execute an arbitrary command with forged 'input'. i.e.
/bin/sh -c
const qpdf = require('node-qpdf'); qpdf.decrypt('/the/path/of/filename.pdf; ls -al; rm -rf /', 'somepassword');
It could take a time to resolve this issue, but at least it should be documented(to avoid putting arbitrary path on a first argument).
The text was updated successfully, but these errors were encountered:
If the first argument used path.resolve would that help mitigate injection?
path.resolve
const path = require('path'); const qpdf = require('node-qpdf'); const injectString = '/the/path/of/filename.pdf; ls -al; rm -rf /'; qpdf.decrypt(path.resolve(__dirname, injectString), 'somepassword');
Sorry, something went wrong.
The problem also exists in the encrypt method. You can for example prove $(echo hello > file) as a password and it will be executed.
$(echo hello > file)
No branches or pull requests
Due to the using of
/bin/sh -c
blablabla... it can execute an arbitrary command with forged 'input'.i.e.
It could take a time to resolve this issue, but at least it should be documented(to avoid putting arbitrary path on a first argument).
The text was updated successfully, but these errors were encountered: