Skip to main content

CVE-2026-33139

HIGH
Incomplete List of Disallowed Inputs (CWE-184)
2026-03-18 https://github.com/ParzivalHack/PySpector GHSA-v3xv-8vc3-h2m6
7.8
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

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

  1. Access
    Craft malicious plugin with getattr() indirect calls
  2. Exploit
    Bypass AST validation in validate_plugin_code()
  3. Execution
    Execute dangerous OS commands via plugin system
  4. Impact
    Achieve arbitrary code execution with user privileges

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
Exploitation Conditions

Local attacker tricks user into loading a malicious PySpector plugin (≤0.1.6) that bypasses validation via indirect getattr() calls. Requires victim interaction: user must open/execute the crafted plugin file locally.

Impact

While no CVSS score has been assigned yet, the real-world risk is moderate to high depending on deployment context. The attack vector requires local user interaction (explicit installation with the --trust flag), significantly limiting passive exploitation scenarios compared to remote or unauthenticated vulnerabilities. However, the technical impact is severe (full code execution), and a working proof-of-concept is publicly available, lowering the skill barrier for exploitation. The risk escalates dramatically in automated environments like CI/CD pipelines where PySpector may run with elevated privileges in pre-commit hooks or scheduled scans, potentially enabling supply chain attacks. The vulnerability is particularly concerning because it undermines an explicit security control that users rely on to safely evaluate third-party plugins. Organizations running PySpector in production environments or accepting community plugins should treat this as high priority despite the required user interaction.

Exploit ScenarioDerived

An attacker creates a malicious PySpector plugin that uses getattr(os, 'system') to invoke shell commands while bypassing AST validation, then distributes it via a GitHub repository, community forum, or social engineering targeting developers. A victim developer seeking additional PySpector functionality downloads and installs the plugin using 'pyspector plugin install malicious_plugin.py --trust', believing the validation system has verified its safety. Upon the next scan execution, the plugin runs arbitrary commands to exfiltrate AWS credentials from environment variables and establish a reverse shell, with the public proof-of-concept providing a ready-made template for attackers.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Mar 18, 2026

PySpector versions 0.1.6 and earlier contain a security validation bypass in the plugin system that allows arbitrary code execution. The validate_plugin_code() function fails to detect dangerous API calls when invoked indirectly via getattr(), allowing malicious plugins to execute system commands. A public proof-of-concept exploit exists demonstrating the bypass, and while exploitation requires user interaction (installing and trusting a malicious plugin), successful exploitation grants full system access including filesystem manipulation, credential theft, and persistence mechanisms.

RemediationAI

Upgrade PySpector to a version newer than 0.1.6 once a patched release becomes available; monitor the GitHub repository at https://github.com/ParzivalHack/PySpector and the security advisory at https://github.com/ParzivalHack/PySpector/security/advisories/GHSA-v3xv-8vc3-h2m6 for patch announcements. Until patching is possible, organizations should implement strict controls around plugin sources by only installing plugins from the official PySpector repository, manually reviewing all third-party plugin code before installation regardless of validation results, and restricting the use of the --trust flag to administrator-vetted plugins only. In high-security environments, consider disabling the plugin system entirely or running PySpector in sandboxed containers with minimal filesystem and network access to limit the blast radius of potential exploitation.

Affected Packages

pypi pyspector fix: 0.1.7

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

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

Technical ContextAI · show details

PySpector is a Python security analysis tool distributed via pip (pkg:pip/pyspector) that implements a plugin architecture with security validation. The vulnerability is rooted in CWE-184 (Incomplete List of Disallowed Inputs), where the AST-based code validator's resolve_name() helper function only handles ast.Name and ast.Attribute node types. When plugin code uses indirect function references through getattr() calls (e.g., getattr(os, 'system')), the outer call generates an ast.Call node type, causing resolve_name() to return None and bypass the security check entirely. This validation gap allows arbitrary Python code execution within the context of PySpector's runtime environment, defeating the entire trust model of the plugin system.

Know when the next one hits your stack

  • 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

GitHub Advisory PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

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

Lifecycle Timeline

2
Patch released
Mar 31, 2026 - 21:13 nvd
Patch available
CVE Published
Mar 18, 2026 - 16:33 nvd
HIGH 7.8

DescriptionGitHub Advisory

Summary

PySpector versions <= 0.1.6 are affected by a security validation bypass in the plugin system. The validate_plugin_code() function in plugin_system.py, performs static AST analysis to block dangerous API calls before a plugin is trusted and executed. However, the internal resolve_name() helper only handles ast.Name and ast.Attribute node types, returning None for all others. When a plugin uses indirect function calls via getattr() (such as getattr(os, 'system')) the outer call's func node is of type ast.Call, causing resolve_name() to return None, and the security check to be silently skipped. The plugin incorrectly passes the trust workflow, and executes arbitrary system commands on the user's machine when loaded.

Impact

An attacker who can deliver a malicious plugin file to a PySpector user and convince them to install it, can achieve arbitrary code execution on the user's local machine. Exploitation requires the victim to explicitly run pyspector plugin install --trust on the malicious file (a deliberate multi-step action that meaningfully limits the attack surface compared to passive vulnerabilities). However, the bypass directly undermines the security guarantee that validate_plugin_code() is designed to provide. Once the plugin is trusted and executed, the following is achievable:

  • Full read/write access to the local filesystem
  • Exfiltration of sensitive data and environment variables (i.e. API keys, credentials, etc...)
  • Establishment of persistence mechanisms
  • Lateral movement in CI/CD environments where PySpector runs with elevated permissions (pre-commit hooks and scheduled scans)

Any user of PySpector who installs third-party plugins outside the official repository is potentially affected.

PoC

The following steps reproduce the vulnerability on PySpector <= 0.1.6:

  1. Create a malicious plugin file that uses getattr-based indirect calls to bypass AST validation, and confirm the validator incorrectly marks it as safe:

<img width="1300" height="675" alt="image" src="https://github.com/user-attachments/assets/4de3a0d1-1c77-4454-ad10-2369d5ca9997" />

  1. Run PySpector Plugin Validator module (this confirms the validator incorrectly marks the plugin as safe):

<img width="908" height="239" alt="image" src="https://github.com/user-attachments/assets/3e3b9603-4d95-4a39-be97-4163f6639599" />

  1. Install and trust the plugin through the normal PySpector workflow:

pyspector plugin install /tmp/evil_plugin.py --trust

  1. Execute the plugin, during a scan:

pyspector scan /any/target --plugin evil

Executive ViewAI

Why It Matters

PySpector versions 0.1.6 and earlier contain a critical code execution vulnerability that could allow attackers to gain complete system compromise if a user installs a malicious plugin. This vulnerability affects any organization using PySpector for code analysis or inspection, potentially exposing sensitive data, system credentials, and enabling unauthorized persistence on affected systems.

Business Impact: High
Compensating Controls

Disable the PySpector plugin system entirely if not mission-critical; restrict PySpector execution to isolated development environments with no production data access; implement application whitelisting to prevent unauthorized child process execution from PySpector; enforce principle of least privilege for user accounts running PySpector; monitor and log all PySpector process activity and file system modifications; maintain air-gapped or sandboxed environments for untrusted code analysis tasks; require manual code review of any third-party plugins before installation approval.

Threat Intelligence Overview

EPSS Score
0.0%
Top 93% exploitable
Data Quality
5 sources
Confidence: Medium

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 HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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

Affected Products (CPE)GitHub Advisory

pkg:pip/pyspector

Related Vulnerabilities in PySpector Plugin and XSS Vulnerabilities

View all 2

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