T09 · Insecure Skill Coding Practices
- Location
scripts/html_to_pdf.sh:131- Finding
Chrome Is Executed Without Its Process Sandbox
- Content
View full analysis
Vulnerability Details
File Location:
scripts/html_to_pdf.sh, lines 131-144
Vulnerability Type: Browser sandbox disabled during processing of HTML content
Risk Level: HighCode Snippet:
bash CHROME_ARGS=( --headless --disable-gpu --no-sandbox --disable-dev-shm-usage --print-to-pdf="$OUTPUT_PDF" --no-pdf-header-footer --print-to-pdf-no-header --virtual-time-budget="$VIRTUAL_TIME_BUDGET" --run-all-compositor-stages-before-draw )Technical Analysis
The
--no-sandboxoption disables Chrome's renderer and process sandbox. The sandbox is a critical security boundary intended to contain vulnerabilities triggered while parsing HTML, JavaScript, fonts, images, and other embedded resources.The script accepts an arbitrary HTML path from its command line and opens that document in Chrome. If the HTML document or one of its referenced resources is malicious, successful exploitation of a Chrome rendering vulnerability would occur without the normal sandbox containment layer. The resulting code could run with the permissions of the user executing this script.
This issue does not itself provide a browser exploit. Exploitation requires a separate vulnerability in the installed Chrome version or another unsafe browser feature. Nevertheless, disabling the sandbox materially increases the impact of such a vulnerability and violates least-privilege execution.
Attack Path
- An attacker supplies or influences the HTML report passed to
html_to_pdf.sh, or causes the report to reference attacker-controlled content. - The victim invokes the conversion script under their normal account.
- Headless Chrome parses the malicious HTML and its embedded resources with
--no-sandbox. - The content exploits a compatible Chrome rendering, JavaScript-engine, image-decoder, font-parser, or related vulnerability.
- Because the sandbox is disabled, the exploit can ...[truncated 674 chars]
- An attacker supplies or influences the HTML report passed to
- Remediation
View remediation
Remediation Suggestions
- Remove
--no-sandboxand run Chrome with its normal process sandbox enabled. - Run conversion under a dedicated, unprivileged service account with no access to secrets or unrelated files.
- Isolate conversion in a hardened container or virtual machine with a read-only filesystem, a dedicated writable output directory, dropped Linux capabilities, resource limits, and no host-directory mounts beyond required inputs and outputs.
- Disable network access during conversion unless remote resources are strictly required. Prefer packaging approved images, fonts, and styles locally.
- Treat report HTML and every referenced resource as untrusted input.
- Keep Chrome automatically patched and pin the supported browser release in reproducible deployment configuration.
- If a specific environment cannot start Chrome's sandbox, correct its namespace, user, or container configuration instead of globally disabling the sandbox.
- Remove
