/

CVE-2026-53872

Severity:

HIGH RISK

(7.5)

Path Traversal Data Exfiltration (CWE-22) in picklescan

CVE-2026-53872

Deferred

Vulnerability type

Category:

Unsafe Deserialization / Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read and Data Exfiltration

Severity:

HIGH RISK

(7.5)

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

picklescan versions before 0.0.35 contain an unsafe pickle deserialization flaw that can be abused to read arbitrary files from the server filesystem.

By chaining io.FileIO with urllib.request.urlopen, unauthenticated attackers can bypass RCE-focused blocklists and exfiltrate sensitive files such as /etc/passwd to remote endpoints.

Affected context

This vulnerability manifests in environments where picklescan is used to inspect or process untrusted pickle data, such as scanning uploaded models or serialized objects.

The risk is elevated when the process has access to sensitive files and outbound network connectivity is allowed.

The issue is particularly relevant in server-side scanning services, CI/CD pipelines, or analysis tools that automatically ingest third-party pickle artifacts.

Exploit preconditions

  • Attack surface: Any service, script, or pipeline that accepts or processes untrusted pickle data with picklescan < 0.0.35
  • Required access: Ability to submit or control serialized pickle input; no authentication may be required if the interface is public
  • Trigger point: Invocation of picklescan on attacker-controlled pickle payloads
  • Why exploitation is possible: The deserialization flow allows construction of io.FileIO and urllib.request.urlopen objects, enabling file reads and outbound HTTP requests that bypass blocklists focused only on direct code execution primitives

Why this happens

The underlying issue is an unsafe deserialization pattern in which pickle data is treated as structurally trustworthy.

Instead of strictly limiting allowed types or performing non-executing inspection, the processing path permits construction of powerful I/O-related objects (io.FileIO, urllib.request.urlopen).

This aligns with CWE-22 in that untrusted input controls filesystem paths indirectly, enabling the attacker to read arbitrary files and exfiltrate them, even when direct remote code execution payloads are blocked.

Potential impact

  • Disclosure of sensitive configuration files (e.g., /etc/passwd, application config, API keys)
  • Exposure of source code or proprietary models hosted on the same filesystem
  • Leakage of environment-specific secrets, tokens, or credentials readable by the process
  • Facilitation of further attacks by revealing internal paths, usernames, and service endpoints

General mitigation guidance

Defensive strategies focus on eliminating unsafe deserialization behaviors and shrinking the power of deserialized objects:

  • Restrict accepted pickle content to a minimal, audited set of safe types and structures
  • Use non-executing or sandboxed inspection mechanisms that never instantiate real I/O or network objects from untrusted data
  • Run scanning or analysis services under a dedicated, least-privilege account with access only to strictly necessary directories
  • Isolate such services in hardened containers or sandboxes and restrict outbound network access wherever feasible
  • Treat all third-party pickle artifacts as untrusted and validate them within controlled, security-reviewed workflows

How teams detect issues like this

Detection commonly involves a mix of static and dynamic approaches:

  • Static analysis rules that flag pickle operations (e.g., pickle.loads, unpickling flows) where untrusted data is involved, especially when combined with I/O or networking libraries
  • Code review checklists that require justification and design review for any pickle usage and for any construction of file or network-related objects during deserialization
  • Runtime monitoring for unusual outbound HTTP requests originating from analysis or scanning services, paired with logs of files accessed shortly before such requests
  • Periodic security testing of pickle-handling pipelines with crafted payloads to confirm enforcement of type restrictions and sandboxing

Sources

SourceLink
github.comgithub.com/mmaitre314/picklescan/security/advisories/GHSA-9726-w42j-3qjr
vulncheck.comvulncheck.com/advisories/picklescan-arbitrary-file-read-via-unsafe-pickle-deserialization

Frequently asked

questions

No. If a service or tool exposes a way to submit pickle data over the network, remote and unauthenticated attackers may exploit it to read and exfiltrate files.

Attackers can read files that are accessible to the user running the picklescan process and exfiltrate them over HTTP, but they do not inherently gain full shell or root access.

Avoid instantiating powerful objects (file handles, network clients) from untrusted pickle content, enforce strict type whitelists or alternative serialization formats, and run deserialization logic within strongly sandboxed, low-privilege environments.

Adopt a policy that bans or tightly constrains pickle usage with untrusted input, incorporate security reviews for any deserialization logic, and enforce automated checks in CI to detect unsafe patterns before deployment.

Find out what's already
exploitable in your codebase.