Unsafe object deserialization
Untrusted bytes reach a format that can instantiate behavior-bearing objects or invoke code, such as Python pickle, without a sufficient trust boundary.
Candidate CWE: CWE-502
Test hypothesis#
Trace file/queue/cache/import input to the real loader, including integrity verification before loading. In an isolated synthetic lab, use a benign marker-only object demonstrating an unexpected callable or object type. Compare a valid normal object and a rejected untrusted object through the supported interface.
Evidence required#
Input origin, loader and options, signature/check placement, attacker role, complete reachable consumer path, and harmless observable behavior. For ML/model formats, distinguish plain numeric data from executable serialization features.
Rule out false positives#
Only trusted, integrity-verified inputs are accepted under the documented contract; a safe loader is used; or the claim bypasses the caller validation by invoking the loader directly.
Playbook and command references#
- Source review: entry point to protected operation — Trace attacker control and authorization through handlers, services, queues, and sensitive operations; promote only reachable violations of a stated invariant.
- OSS lab: pin, install, prove, reset — Turn an eligible release into a repeatable synthetic environment with preserved versions, realistic controls, and an explicit reset recipe.
Find the associated command snippets
Referenced by these target playbooks#
Report checklist#
- Capture the affected version, configuration, identities, and object ownership.
- Preserve a valid baseline and a negative control.
- Reproduce the forbidden data access, action, or state change on controlled fixtures.
- Explain the intended security rule and why the observed behavior violates it.
- State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.
Conditional ATT&CK mapping#
- T1190 · Exploit Public-Facing Application — Only if: A demonstrated exploit of an Internet-facing service provides initial access to its host, system, or environment; explain the foothold and trust boundary. Not established by: Not a blanket label for every web/API weakness. A reflected parameter, scanner alert, or ordinary cross-account object read alone does not establish initial network/system access.
- T1203 · Exploitation for Client Execution — Only if: A client-application vulnerability executes attacker-controlled code when the client processes a file, document, or other content; identify the affected desktop/client process. Not established by: A parser crash alone is insufficient. Ordinary web XSS is not automatically a native client execution exploit, and Mobile uses separate technique IDs.