Summary
Step-Video-T2V contains an unsafe deserialization vulnerability where raw request bodies are passed directly into pickle.loads() in the /vae-api and /caption-api endpoints.
A remote attacker can send crafted serialized payloads to these APIs and execute arbitrary code on the server during deserialization.
Affected context
The vulnerability exists in Step-Video-T2V deployments where the /vae-api and /caption-api HTTP endpoints accept serialized data and process it using Python's pickle.loads() function.
Any environment exposing these endpoints to untrusted clients (including public internet exposure or semi-trusted internal networks) is at risk, because the server treats incoming request bodies as trusted serialized objects without additional validation or isolation.
Exploit preconditions
- Attack surface: Network-accessible
/vae-apiand/caption-apiendpoints - Required access: Ability to send HTTP requests to the affected endpoints (no inherent need for local access)
- Trigger point: Server-side call to
pickle.loads(request.get_data())during request handling - Why exploitation is possible: Python's
pickleformat is inherently capable of invoking arbitrary object constructors and code during deserialization; using it directly on attacker-controlled data allows execution of attacker-supplied behavior within the application process.
Why this happens
The core issue is the use of Python's pickle.loads() on untrusted request data, mapping directly to CWE-502: Deserialization of Untrusted Data.
The API implementation implicitly assumes that all incoming serialized payloads are well-formed and benign, and it does not enforce a safe data format, a type whitelist, or any sandboxing.
Because pickle is a code-capable serialization format, treating network input as pickled objects creates a direct path from remote input to code execution in the application context.
Potential impact
- Remote execution of arbitrary code within the Step-Video-T2V server process
- Complete compromise of the application environment and underlying host (depending on permissions)
- Theft or manipulation of video, model, and captioning data processed by the service
- Use of the compromised server as a pivot point for lateral movement within the network
- Deployment of malware or cryptominers under the server's identity
General mitigation guidance
Effective mitigation focuses on eliminating or constraining unsafe deserialization paths:
- Avoid using
pickleor any code-executing serialization formats for data received over the network. - Prefer safe, data-only formats (e.g., JSON, protocol buffers, MsgPack in "plain data" mode) for request bodies.
- If object reconstruction is necessary, apply strict whitelisting of allowed types and fields, and avoid magic methods that can trigger code execution.
- Introduce a clear trust boundary: treat all external inputs as untrusted and validate them against a schema before use.
- Run the service under least-privilege accounts and with minimized filesystem and network permissions to reduce blast radius if a bug is missed.
How teams detect issues like this
Detection commonly combines code-level analysis and operational monitoring:
- Use static analysis or code search to flag calls to
pickle.loads(),pickle.load(), or similar deserialization APIs that accept data fromrequest.get_data()or other network sources. - During code review, scrutinize any deserialization logic in API handlers, especially where binary bodies are accepted without schema validation.
- Enforce secure coding guidelines that prohibit unsafe deserialization from untrusted sources and require safer data formats by default.
- Optionally integrate automated security scanners or linters into CI pipelines to alert on uses of dangerous deserialization APIs in web-facing code.

