Summary
LMDeploy's remote media URL checks can interpret a URL differently from the HTTP client that sends the request. If an application fetches attacker-controlled media URLs, this discrepancy may let an attacker reach internal HTTP services and expose data those services return.
Affected context
The issue occurs in LMDeploy's handling of remote media URLs when URL validation and request processing interpret backslashes differently. It becomes relevant in applications that accept attacker-controlled URLs and use the affected handling to make outbound HTTP requests; the validation may approve a destination that the HTTP client ultimately interprets as internal.
Exploit preconditions
- Attack surface: An application feature that fetches remote media over HTTP.
- Required access: The ability to submit or influence a media URL; authentication requirements depend on the application.
- Trigger point: The application validates the URL and then fetches it with an HTTP client.
- Why exploitation is possible: Validation and request handling can disagree about the destination, allowing non-global address checks to be bypassed.
Why this happens
The underlying bug is inconsistent URL interpretation across security validation and network request components. The validator uses urlparse, while the HTTP client may interpret backslashes differently, so checks on the parsed hostname do not reliably constrain the request destination. This is a server-side request forgery weakness, mapped to CWE-918, because attacker-influenced input can cause the server to make requests to unintended locations.
Potential impact
- An attacker may cause requests to internal HTTP services.
- Responses from internal services could be exposed through the application.
- Internal network resources may be probed or accessed beyond the intended boundary.
General mitigation guidance
Defensive patterns include validating destinations using the same canonicalization and parsing semantics as the HTTP client, then enforcing network-address policy on the destination actually used for the request. Prefer allowlists of expected hosts and protocols over broad URL acceptance, reduce trust in user-supplied URLs, and restrict outbound network access at the application or workload level. Apply least privilege so the fetching component cannot reach sensitive internal services unnecessarily.
How teams detect issues like this
- Use static analysis to identify URL validation followed by HTTP requests where parsing or canonicalization differs.
- During code review, check whether validation constrains the final connection destination, including after redirects and name resolution.
- Monitor outbound requests from media-fetching components for unexpected internal destinations.
- Enforce egress policies that limit workloads to required external services and deny unnecessary access to private networks.
- Automated security review tools may help flag SSRF-prone URL-fetching patterns.

