load

python · yaml
sink✓ Reviewed · 2026-09-04
RoleSink
WeaknessCWE-502
WatchesArgument[0]
Kinddeserialization
Confidencemedium
Corroboration2

Loads YAML with a loader whose behavior depends on the selected constructor set; unsafe constructors can instantiate objects.

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] load(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: Use SafeLoader or a data-only YAML parser when documents are not fully trusted.

Unsafe shape
yaml.load(body, Loader=Loader);
Safer shape
yaml.load(body, Loader=SafeLoader);
The family · deserialization
Model facts · verbatim from the pack
RoleKindAccess pathModel IDConfidence
sinkdeserializationArgument[0]python.yaml.load.a0medium · corrob. 2
Referencespyyaml.org