Read the docs
TI-2026-66845 Aliases GHSA-7cx2-g3h9-382p

Crawl4AI: Arbitrary file write (symlink/TOCTOU) plus log and webhook-header injection in Docker server

Priority LOW 38CWE-117Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
—
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub.

Summary

### Summary Three backward-compatible hardening fixes in the Docker API server. The headline issue is an arbitrary file write via the screenshot/PDF `output_path`. ### 1. Arbitrary file write via output_path symlink / TOCTOU (primary) `POST /screenshot` and `POST /pdf` accept an `output_path` constrained to `ALLOWED_OUTPUT_DIR` by `validate_output_path`. The 0.8.7 check was string-only: it did not resolve symlinks, so a symlinked path component inside the output directory could redirect the write outside the directory, and the final `open()` followed symlinks. On a deployment where the runtime user can write executable/cron locations this is an arbitrary-write to code-execution primitive. The API is unauthenticated by default. Fix: `validate_output_path` now resolves the real path (symlinks) of the parent and re-checks containment, and the write uses `O_NOFOLLOW` (`write_output_file`). `output_path` remains supported. ### 2. CRLF log injection (CWE-117) User-controlled URLs/errors reflected into log lines could embed CR/LF and forge additional log entries. Fix: a logging filter strips CR/LF/control characters from all records. ### 3. Webhook request-header injection (CWE-93/CWE-113) User-supplied webhook headers were sent verbatim, allowing CRLF and hop-by-hop / sensitive header injection on the outbound webhook request. Fix: webhook headers are validated (name pattern, no control characters, deny `Host`/`Content-Length`/`Transfer-Encoding`/`Authorization`/`Cookie`/...), with early request-time rejection. ### Impact Arbitrary file write (potential code execution) for #1; log forging for #2; request smuggling / header injection on outbound webhooks for #3. ### Workarounds - Upgrade to the patched version. - Enable authentication (`CRAWL4AI_API_TOKEN`). - Run the container with a read-only root filesystem. ### Credits Internal security audit (Crawl4AI maintainers).

Why it matters now

Fix Fixed crawl4ai (PyPI): 0.8.8

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—crawl4ai (PyPI)before 0.8.80.8.8Patch availableGHSA-7cx2-g3h9-382p
  • crawl4ai (PyPI) Vendor— Affected before 0.8.8 Fixed in 0.8.8 Patch available GHSA-7cx2-g3h9-382p

Remediation

  • Fix · GHSA-7cx2-g3h9-382p crawl4ai (PyPI) Fixed in 0.8.8 Advisory →

Timeline

  1. 2026-10-03 Threatist record created from GHSA-7cx2-g3h9-382p

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences