subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: print(f"[Puppeteer] Converting {len(html_files)} HTML -> PNG ({scale}x)...") r = subprocess.run( ["node", str(script_path), json.dumps(config)], cwd=str(work_dir), timeout=300 )- Confidence
- 89% confidence
- Finding
- The code executes Node/Puppeteer to render attacker-supplied local HTML files, which can trigger active content in a browser context and cause network requests or local file access attempts during rendering. Even though command injection is not present, launching a browser on untrusted HTML materially expands the attack surface and can expose sensitive environment data or enable SSRF-like outbound requests depending on Chromium behavior and page content.
