Every CVESearch/Get API key

CVE-2025-71463

Scapy before 2.7.0 Insecure Deserialization RCE via Session Files

5.4 MediumFix available

CVE-2025-71463 is a medium vulnerability (CVSS 5.4) in Secdev Scapy, published October 22, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.24%, the 15th percentile. Fixed in scapy 2.7.0+dfsg1-1.

What does this mean?
Severity
5.4 MediumCVSS 4.0, CVE List
Exploit chance
0.24%EPSS, 15th percentile
Exploitation
None knownNot on CISA’s or ENISA’s lists
Fixed in
2.7.0+dfsg1-1scapy +11 more

Description

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().

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
Low
User interaction
Active

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.24%Down 0.1 points since Nov 13, 2026
90%50%10%1%

Affected products

Affected packages

Affected packages
PackageAffectedFixed
scapy
PyPI
through 2.6.1None known
scapy
Debian:12
All versions, plus listed versions
2.5.0+dfsg-22.5.0+git20240324.2b58b51+dfsg-12.5.0+git20240324.2b58b51+dfsg-22.6.0+dfsg-12.6.0+dfsg-2
Show 6 moreShow less
2.6.1+dfsg-12.6.1+dfsg-22.6.1+dfsg-32.7.0+dfsg-12.7.0+dfsg1-12.8.0+dfsg-1
None known
scapy
Debian:13
All versions, plus listed versions
2.6.1+dfsg-12.6.1+dfsg-22.6.1+dfsg-32.7.0+dfsg-12.7.0+dfsg1-12.8.0+dfsg-1
None known
scapy
Debian:14
before 2.7.0+dfsg1-1, plus listed versions
2.6.1+dfsg-12.6.1+dfsg-22.6.1+dfsg-32.7.0+dfsg-1
2.7.0+dfsg1-1
scapy
PyPI
through 2.6.1, plus listed versions
2.2.0-dev2.3.12.3.22.3.32.4.0
Show 23 moreShow less
2.4.0rc32.4.0rc42.4.0rc52.4.12.4.22.4.32.4.3rc12.4.3rc22.4.3rc32.4.3rc42.4.42.4.4rc12.4.4rc22.4.52.4.5rc12.4rc22.5.02.5.0rc12.5.0rc22.5.0rc32.6.02.6.0rc12.6.0rc2
None known
scapy
Ubuntu:16.04:LTS
All versions, plus listed versions
2.2.0-1
None known
scapy
Ubuntu:18.04:LTS
All versions, plus listed versions
2.3.3-12.3.3-3
None known
scapy
Ubuntu:20.04:LTS
All versions, plus listed versions
2.4.2-12.4.3-32.4.3-4
None known
scapy
Ubuntu:22.04:LTS
All versions, plus listed versions
2.4.4-4ubuntu1
None known
scapy
Ubuntu:24.04:LTS
All versions, plus listed versions
2.5.0+dfsg-22.5.0+dfsg-2ubuntu1
None known
scapy
Ubuntu:26.10
All versions, plus listed versions
2.7.0+dfsg1-1
None known
scapy
Ubuntu:26.04:LTS
All versions, plus listed versions
2.6.1+dfsg-12.6.1+dfsg-32.7.0+dfsg-12.7.0+dfsg1-1
None known

What each source reports

CVE List Score used5.4

Scapy before 2.7.0 Insecure Deserialization RCE via Session Files

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().

Record
CVE-2025-71463
CVSS 4.0
5.4 MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
6.7 MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-502
Updated
2026-11-13
EUVDEUVD-2025-2113185.4

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().

Record
EUVD-2025-211318
CVSS 4.0
5.4 MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Updated
2026-11-13
GitHub AdvisoriesGHSA-cq46-m9x9-j8w25.4

Scapy Session Loading Vulnerable to Arbitrary Code Execution via Untrusted Pickle Deserialization

Summary

An unsafe deserialization vulnerability in Scapy <v2.7.0 allows attackers to execute arbitrary code when a malicious session file is locally loaded via the -s option. This requires convincing a user to manually load a malicious session file.


Details

Scapy’s interactive shell supports session loading using gzip-compressed pickle files:

./run_scapy -s <session_file.pkl.gz>

Internally, this triggers:

# main.py
SESSION = pickle.load(gzip.open(session_name, "rb"))

Since no validation or restriction is performed on the deserialized object, any code embedded via __reduce__() will be executed immediately. This makes it trivial for an attacker to drop a malicious .pkl.gz in a shared folder and have it executed by unsuspecting users.

The vulnerability exists in the load_session function, which deserializes data using pickle.load() on .pkl.gz files provided via the -s CLI flag or programmatically through conf.session.

Affected lines in source code: https://github.com/secdev/scapy/blob/master/scapy/main.py#L569-L572

try:
    s = pickle.load(gzip.open(fname, "rb"))
except IOError:
    try:
        s = pickle.load(open(fname, "rb"))

Impact

This is a classic deserialization vulnerability which leads to Code Execution (CE) when untrusted data is deserialized.

Any user who can trick another user into loading a crafted .pkl.gz session file (e.g. via -s option) can execute arbitrary Python code.

  • Vulnerability type: Insecure deserialization (Python pickle)
  • CWE: CWE-502: Deserialization of Untrusted Data
  • CVSS v4.0 Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
  • CVSS Score: 5.4 (Medium)
  • Impact: Arbitrary Code Execution
  • Attack vector: Local or supply chain (malicious .pkl.gz)
  • Affected users: Any user who loads session files (even interactively)
  • Affected version: Scapy v2.6.1

Mitigations

  • Do not use 'sessions' (the -s option when launching Scapy).
  • Use the Scapy 2.7.0+ where the session mechanism has been removed.
Record
GHSA-cq46-m9x9-j8w2
CVSS 4.0
5.4 MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-502
Updated
2026-11-02
GitHub AdvisoriesGHSA-f572-w3j5-2qmc5.4

Scapy before 2.7.0 contains an insecure deserialization vulnerability in the load_session...

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().

Record
GHSA-f572-w3j5-2qmc
CVSS 4.0
5.4 MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
6.7 MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-502
Updated
2026-11-13
NVD5.4

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().

Record
CVE-2025-71463
CVSS 4.0
5.4 MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
6.7 MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-502
Updated
2026-11-13
OSV5.4

Scapy before 2.7.0 Insecure Deserialization RCE via Session Files

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().

Record
CVE-2025-71463
CVSS 4.0
5.4 MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-502
Updated
2026-11-14
OSVDEBIAN-CVE-2025-714635.4

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().

Record
DEBIAN-CVE-2025-71463
CVSS 4.0
5.4 MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Updated
2026-11-14
OSVGHSA-cq46-m9x9-j8w25.4

Scapy Session Loading Vulnerable to Arbitrary Code Execution via Untrusted Pickle Deserialization

Summary

An unsafe deserialization vulnerability in Scapy <v2.7.0 allows attackers to execute arbitrary code when a malicious session file is locally loaded via the -s option. This requires convincing a user to manually load a malicious session file.


Details

Scapy’s interactive shell supports session loading using gzip-compressed pickle files:

./run_scapy -s <session_file.pkl.gz>

Internally, this triggers:

# main.py
SESSION = pickle.load(gzip.open(session_name, "rb"))

Since no validation or restriction is performed on the deserialized object, any code embedded via __reduce__() will be executed immediately. This makes it trivial for an attacker to drop a malicious .pkl.gz in a shared folder and have it executed by unsuspecting users.

The vulnerability exists in the load_session function, which deserializes data using pickle.load() on .pkl.gz files provided via the -s CLI flag or programmatically through conf.session.

Affected lines in source code: https://github.com/secdev/scapy/blob/master/scapy/main.py#L569-L572

try:
    s = pickle.load(gzip.open(fname, "rb"))
except IOError:
    try:
        s = pickle.load(open(fname, "rb"))

Impact

This is a classic deserialization vulnerability which leads to Code Execution (CE) when untrusted data is deserialized.

Any user who can trick another user into loading a crafted .pkl.gz session file (e.g. via -s option) can execute arbitrary Python code.

  • Vulnerability type: Insecure deserialization (Python pickle)
  • CWE: CWE-502: Deserialization of Untrusted Data
  • CVSS v4.0 Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
  • CVSS Score: 5.4 (Medium)
  • Impact: Arbitrary Code Execution
  • Attack vector: Local or supply chain (malicious .pkl.gz)
  • Affected users: Any user who loads session files (even interactively)
  • Affected version: Scapy v2.6.1

Mitigations

  • Do not use 'sessions' (the -s option when launching Scapy).
  • Use the Scapy 2.7.0+ where the session mechanism has been removed.
Record
GHSA-cq46-m9x9-j8w2
CVSS 4.0
5.4 MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-502
Updated
2026-11-14
OSVUBUNTU-CVE-2025-714635.4

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().

Record
UBUNTU-CVE-2025-71463
CVSS 4.0
5.4 MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
6.7 MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-13

History

History
RecordedChangedSources
affected, aliases, facts, referencesOSV
referencesOSV
affected, aliases, published, referencesNVD, OSV
affected, aliases, published, referencesOSV
publishedEUVD
publishedEUVD
aliases, referencesGitHub Advisories, NVD
aliases, publishedEUVD
first indexedCVE List
first indexedGitHub Advisories, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

References

Show 5 moreShow less
MoveEnter Open