CVE-2026-33139: Pyspector PySpector Has A Plugin Sandbox Vulnerability
HIGHCVE-2026-33139 is a HIGH pyspector has a plugin sandbox vulnerability (CWE-184: Incomplete List of Disallowed Inputs) affecting Pyspector libraries in the PyPI ecosystem. The issue involves pyspector has a plugin sandbox bypass leads to arbitrary code execution. Remediation is available by upgrading affected packages to version 0.1.7.
CVE-2026-33139 at a Glance
How to Fix CVE-2026-33139
To remediate this vulnerability, upgrade all affected Pyspector dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pyspector>=0.1.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pyspector
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-33139, inspect your installed packages using pip:
pip show pyspector
Analyze the terminal output to locate any version of Pyspector in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.7), your application is affected.
Note: The pip show pyspector command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-184: Incomplete List of Disallowed Inputs, where the product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete. In Pyspector, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-33139 Affected Pyspector Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pyspector
|
PyPI |
< 0.1.7
|
0.1.7
|
References
Frequently Asked Questions
What is CVE-2026-33139?
Which Pyspector versions are affected?
What version fixes CVE-2026-33139?
Is pyspector affected?
What CWE is associated with CVE-2026-33139?
How can I check PyPI dependencies for CVE-2026-33139?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v3xv-8vc3-h2m6",
"modified" : "2026-03-20T21:33:07Z",
"published" : "2026-03-18T16:33:34Z",
"aliases" : [ "CVE-2026-33139" ],
"summary" : "PySpector has a Plugin Sandbox Bypass leads to Arbitrary Code Execution",
"details" : "### Summary\nPySpector 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.\n\n### Impact\nAn 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:\n- Full read/write access to the local filesystem\n- Exfiltration of sensitive data and environment variables (i.e. API keys, credentials, etc...)\n- Establishment of persistence mechanisms\n- Lateral movement in CI/CD environments where PySpector runs with elevated permissions (pre-commit hooks and scheduled scans)\n\nAny user of PySpector who installs third-party plugins outside the official repository is potentially affected.\n\n### PoC\nThe following steps reproduce the vulnerability on PySpector `<= 0.1.6`:\n1. Create a malicious plugin file that uses getattr-based indirect calls to bypass AST validation, and confirm the validator incorrectly marks it as safe:\n<img width=\"1300\" height=\"675\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4de3a0d1-1c77-4454-ad10-2369d5ca9997\" />\n2. Run PySpector Plugin Validator module (this confirms the validator incorrectly marks the plugin as safe):\n<img width=\"908\" height=\"239\" alt=\"image\" src=\"https://github.com/user-attachments/assets/3e3b9603-4d95-4a39-be97-4163f6639599\" />\n3. Install and trust the plugin through the normal PySpector workflow:\n\n`pyspector plugin install /tmp/evil_plugin.py --trust`\n4. Execute the plugin, during a scan:\n`pyspector scan /any/target --plugin evil`",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pyspector"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.7"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.1.6"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ParzivalHack/PySpector/security/advisories/GHSA-v3xv-8vc3-h2m6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33139"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ParzivalHack/PySpector"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-184" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-18T16:33:34Z",
"nvd_published_at" : "2026-03-20T20:16:48Z"
}
}