fix: add SSRF protection and enable TLS verification in URI source - #313
fix: add SSRF protection and enable TLS verification in URI source#313Joshua-Medvinsky wants to merge 1 commit into
Conversation
|
Someone is attempting to deploy a commit to the LLMStack Team on Vercel. A member of the Team first needs to authorize it. |
Signed-off-by: FailSafe Researcher <joshua@getfailsafe.com>
ebee966 to
4bf591a
Compare
|
Hi! Friendly follow-up on this security fix. Happy to adjust the approach if you have concerns about backwards compatibility, tests, or scope. If you'd prefer a different disclosure channel such as private vulnerability reporting or a security contact, I can resubmit there. |
|
Hi - friendly follow-up on this security fix PR. Happy to rebase, split the change, or adjust the approach if there are compatibility or scope concerns. If you prefer a private channel for security reports, I can also resubmit via PVRA/security@. |
|
Hi! Friendly follow-up on this security fix. Happy to adjust the approach if you have concerns about backwards compatibility, tests, or scope. If you'd prefer a different disclosure channel such as private vulnerability reporting or a security contact, I can resubmit there. |
Problem
The URI data source passes user-controlled URLs directly to
requests.head()andrequests.get()withverify=False, enabling SSRF attacks against internal services and cloud metadata endpoints, as well as MITM attacks on outbound connections.Fix
_is_private_url()validation function that blocks URLs pointing to private/internal IP ranges (RFC 1918, loopback, link-local, reserved) and known metadata hostnames.verify=Falsetoverify=Trueinget_url_content_type().ValueErrorwhen a private URL is detected.Test Plan
Security Note
Severity: High — SSRF allows access to internal services and cloud metadata (AWS/GCP/Azure credentials). Disabled TLS verification enables MITM attacks.