/

CVE-2025-57622

Severity:

CRITICAL RISK

(9.8)

Unsafe Deserialization in Step-Video-T2V API Endpoints

CVE-2025-57622

Awaiting Analysis

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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-api and /caption-api endpoints
  • 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 pickle format 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 pickle or 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 from request.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.

Sources

SourceLink
github.comgithub.com/stepfun-ai/Step-Video-T2V/blob/main/api/call_remote_server.py
github.comgithub.com/stepfun-ai/Step-Video-T2V/issues/65

Frequently asked

questions

Yes. Any attacker who can reach the /vae-api or /caption-api endpoints and send crafted HTTP requests can potentially exploit this issue.

The attacker typically only needs network access to the exposed endpoints; no local system access is required, and authentication requirements depend on how the service is deployed.

Replace pickle-based deserialization for incoming requests with a safe, data-only serialization format (such as JSON) and enforce strict schema validation on all fields before processing.

Establish a policy that forbids use of code-capable serialization formats (like pickle) for untrusted input, adopt secure defaults for API payload formats, and integrate security-focused code review and static analysis to catch unsafe deserialization patterns early.

Find out what's already
exploitable in your codebase.