/

CVE-2026-10042

Severity:

CRITICAL RISK

(9.8)

Unsafe Deserialization in manga-image-translator Shared API

CVE-2026-10042

Deferred

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

manga-image-translator exposes a remote code execution vulnerability in its shared API server mode by deserializing attacker-controlled request bodies using Python's pickle.loads().

A remote attacker can send crafted pickle payloads to the /execute/{method_name} and /simple_execute/{method_name} endpoints to execute arbitrary code in the server process, which can lead to full container compromise in the default Docker deployment running as root.

Affected context

This vulnerability affects deployments of manga-image-translator that:

  • Run the shared API server mode using the share.py module
  • Expose the /execute/{method_name} and /simple_execute/{method_name} HTTP endpoints
  • Accept serialized request bodies that are passed directly into pickle.loads()
  • Operate within containers (or hosts) where the API server is reachable over the network

In the default Docker setup, the server typically runs as root inside the container, increasing the impact scope if the process is compromised.

Exploit preconditions

  • Attack surface: Network-accessible HTTP API on the shared server (e.g., container port exposed or reachable within a cluster/VPN).
  • Required access: Ability to send HTTP requests to /execute/{method_name} or /simple_execute/{method_name}; no prior authentication is implied by the description.
  • Trigger point: Submission of a crafted HTTP request body containing a malicious pickle payload that is deserialized by pickle.loads() in share.py.
  • Why exploitation is possible: Python's pickle format is inherently capable of invoking arbitrary object constructors and functions during deserialization. Because the server treats untrusted request bodies as trusted serialized objects and passes them directly into pickle.loads() without validation or sandboxing, attacker-controlled data is effectively executed as code within the server process.

Why this happens

The core issue is the direct use of Python's pickle.loads() on untrusted data from HTTP request bodies in the share.py module.

Pickle is designed for object serialization between trusted components and allows execution of arbitrary code during object reconstruction via __reduce__ and related mechanisms.

By exposing endpoints that accept serialized objects and deserializing them without any trust boundary, format restriction, or validation, the application falls into the CWE-502: Unsafe Deserialization category.

Abstractly, this is an insecure pattern where a general-purpose, code-capable serialization mechanism is used as a remote data interchange format, causing data to be treated as executable instructions in the server context.

Potential impact

  • Remote execution of arbitrary Python code within the manga-image-translator API server process
  • Full compromise of the container when running under the default root user in Docker
  • Reading, modifying, or deleting files accessible to the containerized process
  • Exfiltration or tampering with processed images and associated data
  • Use of the compromised container as a pivot point for lateral movement within the hosting environment or network
  • Deployment of malware, cryptominers, or backdoors within the compromised environment

General mitigation guidance

Mitigation approaches generally focus on removing unsafe deserialization paths and reducing the trust placed in client-supplied data:

  • Avoid using pickle (or similarly powerful serialization formats) for any data originating from clients or other untrusted sources.
  • Replace pickle-based request handling with safer, data-only formats such as JSON, MessagePack, or protocol buffers, and explicitly define and validate expected schemas.
  • Implement strict input validation at the API boundary, ensuring that request bodies conform to primitive types and structured schemas rather than arbitrary objects.
  • Separate concerns so that server-side operations are invoked through whitelisted, parameterized methods rather than directly by deserializing complex objects that encode behavior.
  • Run containers and server processes with least privileges (e.g., non-root users, constrained filesystem permissions, reduced Linux capabilities) to limit the blast radius of a compromise.
  • Consider network-level controls (firewalls, service meshes, or API gateways) to restrict which clients can reach the shared API server and rate-limit high-risk endpoints.

How teams detect issues like this

To detect this class of issue and monitor for potential exploitation, organizations can:

  • Use static application security testing (SAST) tools or custom linters to flag any use of pickle.loads(), pickle.load(), or similar unsafe deserialization APIs in request-handling code paths.
  • Establish code review checklists that explicitly question the use of executable serialization formats (pickle, marshal, YAML with unsafe loaders) in network-exposed components.
  • Introduce secure coding policies that prohibit unsafe deserialization of untrusted data and enforce them via pre-commit hooks or CI pipeline rules.
  • Analyze HTTP access logs for suspicious traffic patterns to /execute/{method_name} and /simple_execute/{method_name}, including unusual payload sizes or binary content where simple parameters are expected.
  • Employ runtime monitoring or intrusion detection that can spot anomalous child processes, unexpected network connections, or file system modifications originating from the manga-image-translator container.

Sources

SourceLink
github.comgithub.com/zyddnys/manga-image-translator/commit/d7441481a7ed3236b4e0456670a9962a8c82d94d
github.comgithub.com/zyddnys/manga-image-translator/issues/1141
github.comgithub.com/zyddnys/manga-image-translator/pull/1142
vulncheck.comvulncheck.com/advisories/manga-image-translator-rce-via-unsafe-pickle-deserialization-in-share-model

Frequently asked

questions

Yes. When the shared API server is network-accessible, a remote attacker who can reach the /execute/{method_name} or /simple_execute/{method_name} endpoints can exploit the vulnerability by sending crafted pickle payloads.

The attacker typically needs only the ability to send HTTP requests to the vulnerable endpoints; no additional local access is required. If the service is exposed on the public internet or within a reachable network segment, exploitation can occur over the network.

The safest approach is to remove pickle-based deserialization from all network-facing endpoints and migrate to a data-only serialization format like JSON, combined with explicit schema validation and whitelisting of allowed parameters and method calls. Any remaining use of pickle should be restricted to strictly internal, trusted communication channels.

Design APIs so that requests carry simple, validated data rather than serialized objects, avoid serialization mechanisms that support arbitrary code execution, and enforce secure coding policies that flag or forbid unsafe deserialization. Complement these practices with regular security reviews, automated static analysis for known dangerous APIs, and least-privilege deployment configurations to minimize impact if a flaw slips through.

Find out what's already
exploitable in your codebase.