Skip to content

fix: block SSRF to private hosts in load_image#3894

Open
Chessing234 wants to merge 1 commit into
lm-sys:mainfrom
Chessing234:fix/3873-load-image-ssrf
Open

fix: block SSRF to private hosts in load_image#3894
Chessing234 wants to merge 1 commit into
lm-sys:mainfrom
Chessing234:fix/3873-load-image-ssrf

Conversation

@Chessing234

Copy link
Copy Markdown

Summary

  • Validate HTTP(S) image URLs before fetching in load_image
  • Reject addresses that resolve to private, loopback, link-local, or reserved networks
  • Use strict base64 validation for inline image payloads

Test plan

  • Added tests/test_load_image_security.py
  • python3 -m unittest tests.test_load_image_security

Fixes #3873

Made with Cursor

Validate HTTP(S) image URLs before fetching and reject addresses that
resolve to private, loopback, or link-local networks.

Fixes lm-sys#3873

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vulnerability Report: SSRF + Arbitrary Local File Read in fastchat.utils.load_image via unvalidated image URL/path

1 participant