Herzlich Willkommen auf meinem Blog. Ich poste hier Rezensionen zu Büchern, die ich gelesen habe.
Ich hoffe sie gefallen euch und ihr könnt vielleicht neuen Lesestoff für euch entdecken!
Would you like a secure code example instead?
Under the hood, pdfkit calls wkhtmltopdf as a subprocess. Without proper escaping, an attacker can inject shell commands. If an attacker controls user_url or an option value like page-size , they could inject a semicolon followed by a command: pdfkit v0 8.6 exploit
user_url = "http://example.com'; touch /tmp/pwned #" The shell command becomes: Would you like a secure code example instead
Command injection via improperly sanitized user input in pdfkit 's page-size or custom header/footer options when generating PDFs from HTML or URLs. Vulnerable code pattern import pdfkit User-supplied input user_url = "http://example.com" If the library allows injection via URL parameters, or if using options with shell args: options = { 'page-size': 'A4; touch exploited.txt', # Command injection 'quiet': '' } # Command injection 'quiet': '' }