Skip to content

fix(ssrf): guard explicit proxy connections - #9554

Open
wunianze666-netizen wants to merge 1 commit into
invoke-ai:mainfrom
wunianze666-netizen:codex/fix-download-proxy-ssrf
Open

fix(ssrf): guard explicit proxy connections#9554
wunianze666-netizen wants to merge 1 commit into
invoke-ai:mainfrom
wunianze666-netizen:codex/fix-download-proxy-ssrf

Conversation

@wunianze666-netizen

Copy link
Copy Markdown
Contributor

Summary

  • install InvokeAI's guarded HTTP/HTTPS connection pools on Requests proxy managers
  • prevent an explicit download_proxy from bypassing the connected-peer SSRF check
  • add a regression test using a loopback proxy

Related Issues / Discussions

Refs #9493 (download-queue SSRF follow-up, item 2).

QA Instructions

  • Verified the pre-fix behavior locally: an explicit loopback proxy returned HTTP 200 despite the guarded session.
  • Verified the new behavior locally: the same request is rejected with UnsafeDownloadURLException.
  • python -m ruff check invokeai/app/util/ssrf.py tests/app/util/test_ssrf.py
  • python -m ruff format --check invokeai/app/util/ssrf.py tests/app/util/test_ssrf.py
  • Python compilation and git diff --check pass.

Merge Plan

This is intentionally limited to the proxy-manager path described in #9493. It does not change the explicit private-download opt-out or the separate injected-session follow-up.

Checklist

  • I have performed a self-review of my own code
  • I have added or updated focused tests
  • I have checked the diff for secrets and unrelated files

@github-actions github-actions Bot added python PRs that change python files python-tests PRs that change python tests labels Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python PRs that change python files python-tests PRs that change python tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant