Summary
NVIDIA Spatial Intelligence Lab's GEN3C inference API server unsafely deserializes raw HTTP request bodies using Python's pickle.loads() on the /request-inference and /seed-model endpoints without authentication or input validation.
An attacker who can reach the inference API port can send a crafted pickle payload with a __reduce__ gadget to execute arbitrary code as the inference process on the host.
Affected context
The vulnerability occurs in deployments of NVIDIA SIL's GEN3C where the inference API server is exposed over a network interface and processes incoming requests on the /request-inference and /seed-model endpoints.
It becomes relevant in environments where:
- The inference API port is reachable from untrusted or semi-trusted networks
- HTTP clients can send arbitrary request bodies to these endpoints
- The inference service runs with access to sensitive compute resources, models, or data
Actual risk depends on network segmentation, container isolation, and the privileges of the inference process.
Exploit preconditions
- Attack surface: Network-accessible inference API endpoints (/request-inference and /seed-model) accepting HTTP requests
- Required access: Ability to open a TCP connection to the inference API port and send arbitrary HTTP request bodies (no authentication required)
- Trigger point: Server-side invocation of pickle.loads() on the raw request body during processing of inference or model-seeding requests
- Why exploitation is possible: Python's pickle format supports arbitrary object construction and code execution via mechanisms like __reduce__, and the server treats untrusted request bodies as trusted serialized objects without authentication, validation, or type restrictions
Why this happens
The core issue is the use of Python's pickle.loads() on untrusted data from HTTP request bodies, which directly maps to CWE-502: Deserialization of Untrusted Data.
Pickle is a general-purpose serialization mechanism that can encode instructions to create arbitrary Python objects; when deserialized, these objects may execute attacker-controlled code during construction or state restoration.
By accepting raw serialized payloads from unauthenticated clients and deserializing them without enforcing a strict, non-executable data format, the service effectively grants remote callers the ability to invoke server-side behavior.
This is an example of trusting data formats that are designed for trusted, intra-process or same-tenant communication and reusing them as a network API boundary format.
Potential impact
- Remote execution of arbitrary code as the inference process user
- Complete compromise of the inference service and its runtime environment
- Unauthorized access to or modification of machine learning models and parameters
- Exfiltration or tampering of sensitive input/output data handled by the inference API
- Use of the compromised host as a pivot point for lateral movement within the network
- Deployment of persistent backdoors or cryptominers on systems running the inference service
General mitigation guidance
Effective mitigation focuses on eliminating unsafe deserialization and reducing trust in network-originated data.
Recommended patterns include:
- Replacing pickle-based communication with data-only formats such as JSON, protobuf, or other schema-based encodings that cannot embed executable behavior
- Implementing explicit, typed request schemas for inference and model-seeding operations, including strict validation of all fields and rejecting unknown or unexpected data
- Ensuring that any remaining serialization mechanism used across the network does not support arbitrary object graphs or lifecycle hooks that can trigger code execution
- Applying strong authentication and authorization controls on inference-related endpoints to limit who can submit requests
- Running the inference service with least-privilege OS accounts, constrained filesystem access, and hardened container or sandbox boundaries to minimize blast radius if an issue occurs
- Segmenting network access so that inference endpoints are not directly exposed to the public internet unless strictly necessary, and are protected by gateways or API firewalls
How teams detect issues like this
Detection strategies typically combine code-centric and operational monitoring approaches:
- Static analysis and code review:
- Search for use of pickle.loads(), pickle.load(), or similar unsafe deserialization functions in HTTP request handlers or other externally facing code paths
- Flag any deserialization of request bodies that are not first parsed through safe, declarative schemas
- Enforce secure coding guidelines that ban pickle for network APIs via linters, pre-commit hooks, or CI policy checks
- Configuration and architecture review:
- Audit API endpoints for direct exposure of internal serialization formats
- Validate that authentication and authorization are consistently applied to all inference-related routes
- Runtime monitoring:
- Monitor inference hosts or containers for anomalous process executions, unexpected outbound connections, or uncharacteristic filesystem changes caused by the inference process
- Use web application firewalls or API gateways capable of enforcing payload size limits and basic anomaly detection on binary or non-JSON request bodies
Automated application security testing tools and code scanners can help spot the use of dangerous deserialization patterns early in the development lifecycle.

