Skip to content

fix: SSRF backstop on i2v image URL fetch#7

Open
Johan-de-R wants to merge 1 commit into
deep-main-v1.1.1-videogenfrom
johan/ltx23
Open

fix: SSRF backstop on i2v image URL fetch#7
Johan-de-R wants to merge 1 commit into
deep-main-v1.1.1-videogenfrom
johan/ltx23

Conversation

@Johan-de-R

Copy link
Copy Markdown

Defense-in-depth backstop now that deepapi resolves the i2v image via MultimodalDownloader (backend ai-dynamo#3220) and the worker normally receives base64. If the worker ever does fetch a URL directly, resolve_image_bytes now validates the host resolves to a globally-routable address and re-validates redirects (rejects cloud metadata / localhost / private ranges). Follows #6 (merged).
🤖 Generated with Claude Code

resolve_image_bytes fetched any customer-supplied http(s) URL server-side with
no protection (the # noqa: S310 just silenced the linter), so an attacker could
hit cloud metadata (169.254.169.254), localhost, or internal/private ranges --
directly or via redirect. Add _assert_public_host: resolve the host and require
every address to be globally routable (rejects private/loopback/link-local/
reserved/multicast), validate before connecting, and re-validate every redirect
hop via a custom opener. Residual: DNS-rebinding TOCTOU is not covered.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the fix label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant