loads

python · pickle
sink✓ Reviewed · 2026-09-04
RoleSink
WeaknessCWE-502
WatchesArgument[0]
Kinddeserialization
Confidencehigh
Corroboration3

Deserializes bytes using Python pickle and can execute code during reconstruction.

Argument map · what each slot does

The pack does not provide a callable signature for this record; the watched access path is shown directly.

ArgAccess pathPurposeWatched
Argument[0]Argument[0]The access path Atropos marks for this model.▲ sink
The weakness
CWE-502
Deserialization of Untrusted Data

Untrusted data is deserialized without ensuring the resulting object is safe.

What goes wrong
Attacker's-eye view · deserialization

A crafted payload invokes constructors, resolves types, or creates objects with behavior beyond plain data.

// modeled boundary: Argument[0] loads(attacker_influenced_value);
To decide if this call is a bug, check
1Use a data-only format when possible.
2Select a safe loader and schema.
3Bound size, depth, and resource use.
These checks require the surrounding codebase. The model names the boundary; it does not decide reachability or prove that a guard dominates every path.
Is this a bug in your code?Atropos stops here — by design

Atropos identifies Argument[0] as a deserialization sink. It cannot see whether untrusted data reaches this call in your repository.

Lachesis is the codebase-level step: it traces reachability and guards for this symbol.

Check this symbol in Lachesis
Reviewed guidance

Safer direction: Do not deserialize attacker-controlled pickle data; use a data-only format.

Unsafe shape
pickle.loads(request.data);
Safer shape
json.loads(request.data);
The family · deserialization
Model facts · verbatim from the pack
RoleKindAccess pathModel IDConfidence
sinkdeserializationArgument[0]python.pickle.loads.a0high · corrob. 3
Referencesdocs.python.org