CVE-2026-33139
JSON

8.3high

PySpector: Plugin Sandbox Bypass leads to Arbitrary Code Execution

Severity
8.3high CVSS:4.0 by GitHub_M
Exploit likelihood
0.20% (higher than 10% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-v3xv-8vc3-h2m6PYSEC-2026-3030

Description

PySpector is a static analysis security testing (SAST) Framework engineered for modern Python development workflows. PySpector versions 0.1.6 and prior 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. This issue has been patched in version 0.1.7.

Affected

Product or packageVersionsReported by
ParzivalHack PySpector< 0.1.7, before 0.1.7CVE List, NVD
pyspector (PyPI)before 0.1.7GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M8.3high CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N

Classification

CWE-184

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

PySpector is a static analysis security testing (SAST) Framework engineered for modern Python development workflows. PySpector versions 0.1.6 and prior 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. This issue has been patched in version 0.1.7.

GitHub Advisory Database
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: image
  2. Run PySpector Plugin Validator module (this confirms the validator incorrectly marks the plugin as safe): image
  3. Install and trust the plugin through the normal PySpector workflow:

pyspector plugin install /tmp/evil_plugin.py --trust 4. Execute the plugin, during a scan: pyspector scan /any/target --plugin evil

NVD (es)

PySpector es un framework de pruebas de seguridad de análisis estático (SAST) diseñado para flujos de trabajo de desarrollo de Python modernos. Las versiones 0.1.6 y anteriores de PySpector están afectadas por una omisión de validación de seguridad en el sistema de plugins. La función validate_plugin_code() en plugin_system.py, realiza un análisis AST estático para bloquear llamadas peligrosas a la API antes de que un plugin sea confiable y ejecutado. Sin embargo, la función auxiliar interna resolve_name() solo maneja los tipos de nodo ast.Name y ast.Attribute, devolviendo None para todos los demás. Cuando un plugin utiliza llamadas a funciones indirectas a través de getattr() (como getattr(os, 'system')) el nodo func de la llamada externa es de tipo ast.Call, lo que provoca que resolve_name() devuelva None, y que la comprobación de seguridad se omita silenciosamente. El plugin pasa incorrectamente el flujo de trabajo de confianza y ejecuta comandos de sistema arbitrarios en la máquina del usuario cuando se carga. Este problema ha sido parcheado en la versión 0.1.7.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-33139 changed 2026-03-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-v3xv-8vc3-h2m6 changed 2026-07-13CC-BY-4.0
NVDCVE-2026-33139 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-3030 changed 2026-07-13CC-BY-4.0