/

CVE-2026-25873

Severity:

CRITICAL RISK

(9.8)

Unsafe Deserialization in OmniGen2-RL Reward Server

CVE-2026-25873

Awaiting Analysis

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Unauthenticated 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

OmniGen2-RL's reward server exposes an unauthenticated remote code execution vulnerability by deserializing attacker-controlled HTTP POST bodies using Python's pickle mechanism.

A remote attacker who can reach the reward server endpoint can send a crafted request that triggers arbitrary code execution on the host running the service, without needing valid credentials.

Affected context

The vulnerability occurs in the OmniGen2-RL reward server component when it processes incoming HTTP POST requests.

The server accepts serialized data in the request body and deserializes it using Python's pickle facilities without enforcing authentication, origin checks, or strict content validation.

Any deployment that exposes this reward server to untrusted networks (including internal flat networks where untrusted code or machines exist) may be affected, especially when the service runs with elevated privileges or on shared infrastructure.

Exploit preconditions

  • Attack surface: Network-accessible HTTP interface of the OmniGen2-RL reward server
  • Required access: Ability to send HTTP POST requests to the exposed reward server endpoint (no authentication required)
  • Trigger point: Server-side handling of POST request bodies that are deserialized using Python pickle
  • Why exploitation is possible: Python's pickle deserialization inherently allows execution of arbitrary object constructors; using it on untrusted request bodies without authentication or content validation maps directly to unsafe deserialization (CWE-502)

Why this happens

The core issue is the use of Python's pickle deserialization on data received directly from HTTP clients.

Pickle is designed for trusted, in-process or tightly controlled data and can execute arbitrary callables during object reconstruction.

By treating inbound network data as trusted and passing it to pickle without constraints, the reward server effectively allows remote clients to supply executable object graphs, which leads to code execution during deserialization.

This pattern exemplifies CWE-502: untrusted data is deserialized using a mechanism that can instantiate and invoke arbitrary code paths, without validation, authentication, or format restrictions.

Potential impact

  • Remote attackers can execute arbitrary commands or code on the host running the reward server
  • Full compromise of the OmniGen2-RL environment and associated workloads
  • Lateral movement to other systems in the same network or cluster
  • Theft or manipulation of training data, models, or reward signals
  • Installation of persistent backdoors, cryptominers, or further malware
  • Disruption or sabotage of reinforcement learning experiments and pipelines

General mitigation guidance

Effective mitigation focuses on eliminating unsafe deserialization and tightening trust boundaries around network-facing components:

  • Replace Python pickle deserialization for network inputs with safer, data-only formats such as JSON, MessagePack, or protocol buffers, paired with strict schema validation.
  • Constrain accepted input structures explicitly (e.g., whitelisted fields and types) and reject unexpected data early in request handling.
  • Introduce strong authentication and authorization controls on reward server endpoints so that only trusted clients can submit data.
  • Apply network-layer protections (firewalls, service meshes, API gateways) to ensure the reward server is not directly exposed to the public internet or untrusted segments.
  • Run the reward server with least-privilege OS accounts, locked-down filesystem permissions, and minimal capabilities to limit blast radius if an issue occurs.
  • Consider secure-by-default defaults in framework and deployment configuration, ensuring that deserialization of complex objects is disabled or heavily restricted for remote inputs.

How teams detect issues like this

Detection can combine code-centric and operational approaches:

  • Use static analysis or code search to flag uses of pickle.load, pickle.loads, or equivalent deserialization calls on data derived from HTTP request bodies, sockets, or other untrusted sources.
  • During code review, treat any use of pickle in networked services as a high-risk pattern; reviewers should verify that only trusted data flows reach deserialization paths.
  • Incorporate security-focused linters or SAST tools into CI pipelines with rules tuned to unsafe deserialization APIs and network handlers.
  • Add runtime monitoring and logging around deserialization points, including detailed request metadata, to detect anomalous payloads or unexpected object types.
  • Deploy host and container-level intrusion detection (HIDS, eBPF-based tooling) to observe suspicious child processes, file modifications, or command execution originating from the reward server process.

Sources

SourceLink
arxiv.orgarxiv.org/abs/2506.18871
chocapikk.comchocapikk.com/posts/2026/omnigen2-pickle-rce/
github.comgithub.com/VectorSpaceLab/OmniGen2/blob/3a13017e532f9f309a38bca571fd62200a6415c5/OmniGen2-RL/reward_server/reward_proxy.py#L208
github.comgithub.com/VectorSpaceLab/OmniGen2/blob/3a13017e532f9f309a38bca571fd62200a6415c5/OmniGen2-RL/reward_server/reward_proxy.py#L224
github.comgithub.com/VectorSpaceLab/OmniGen2/blob/3a13017e532f9f309a38bca571fd62200a6415c5/OmniGen2-RL/reward_server/reward_server.py#L118
github.comgithub.com/VectorSpaceLab/OmniGen2/pull/139
vulncheck.comvulncheck.com/advisories/omnigen2-rl-reward-server-unsafe-deserialization-rce

Frequently asked

questions

Yes. Because the reward server accepts HTTP POST requests and deserializes their bodies using pickle without authentication, any remote party that can reach the endpoint can potentially exploit it.

No. Based on the described behavior, exploitation does not require authentication or local system access; network reachability to the reward server is the primary prerequisite.

The most robust fix is to remove pickle deserialization from all network-facing code paths and switch to a data-only serialization format with strict schema validation, while also enforcing authentication on sensitive endpoints.

Avoid general-purpose executable serialization formats (like pickle or language-specific object serialization) for untrusted data, adopt secure-by-default data formats plus validation, enforce strong authentication on remote APIs, and include targeted checks for unsafe deserialization in design reviews, code review guidelines, and automated security tooling.

Find out what's already
exploitable in your codebase.