---
id: "CVE-2025-71463"
page: "https://infrastack.ai/live/CVE-2025-71463"
kind: "vulnerability"
aliases: ["CVE-2025-71463"]
title: "Scapy: loading a crafted session file runs attacker's Python code"
severity: "medium"
cvss: 6.7
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "scapy", "fixed": [], "affected": "", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["package", "python", "scapy", "security-tools"]
not_affected_if: ["no-session-loading", "scapy-2.7.0-or-later"]
published_at: "2026-11-13T10:17:24+00:00"
first_seen_at: "2026-11-13T10:47:09+00:00"
updated_at: "2026-11-13T10:54:56+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-71463", "first_seen_at": "2026-11-13T10:47:09+00:00"}]
exploit_sources: []
---

# Scapy: loading a crafted session file runs attacker's Python code

Link for people: https://infrastack.ai/live/CVE-2025-71463 (this .md is for agents)

Scapy before 2.7.0 unpickles session files in its load_session function without checks. A crafted .pkl.gz session file can execute embedded Python code when a user loads it with the -s option or conf.session.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:scapy affected range not listed fixed no fixed version listed

## How to check

- Check the installed Scapy version with `pip show scapy` or `python -c "import scapy; print(scapy.VERSION)"`
- Look for session files loaded with `-s` or `conf.session` from untrusted sources

## Fix

- Scapy `2.7.0` or later (from the sources' fixed version)

## Timeline

- 2026-11-13T10:47:09+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2025-71463

## Documents

- [advisory] Vendor advisory: github.com https://github.com/secdev/scapy/security/advisories/GHSA-cq46-m9x9-j8w2
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/scapy-before-2.7.0-insecure-deserialization-rce-via-session-files

## From the sources

Scapy before 2.7.0 contains an insecure deserialization vulnerability in the load_session function that allows attackers to execute code by supplying a malicious pickle session file. Attackers can trick users into loading a crafted .pkl.gz file via the -s option or conf.session, executing embedded Python code through __reduce__().

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
