# CVE-2026-41206: PySpector has a Plugin Code Execution Bypass via Incomplete Static Analysis in PluginSecurity.validate_plugin_code

Source: https://junglewise.ai/threats/cve-2026-41206-pyspector-has-a-plugin-code-execution-bypass-via-incomplete  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-23. Updated: 2026-05-11  
License: CC BY 4.0 with a link back

CVE-2026-41206 · Severity: high · CVSS 7.8 · Published 2026-04-23

PySpector is a static analysis security testing (SAST) Framework engineered for modern Python development workflows. The plugin security validator in PySpector uses AST-based static analysis to prevent dangerous code from being loaded as plugins. Prior to version 0.1.8, the blocklist implemented in `PluginSecurity.validate_plugin_code` is incomplete and can be bypassed using several Python constructs that are not checked. An attacker who can supply a plugin file can achieve arbitrary code execution within the PySpector process when that plugin is installed and executed. Version 0.1.8 fixes the issue.

Technologies: [pyspector (PyPI)](https://junglewise.ai/threats/technologies/pyspector). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-41206 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-41206 being exploited in the wild.

**How severe is CVE-2026-41206?** High severity, with a CVSS score of 7.8, published 23 April 2026.

**Which products and versions are affected?** pyspector (PyPI) <= 0.1.7, ECOSYSTEM:introduced=0,fixed=0.1.8.

**Is there a fix for CVE-2026-41206?** Yes. pyspector (PyPI): upgrade to 0.1.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2026-41206?** Check whether you run Parzivalhack Pyspector or pyspector (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- pyspector (PyPI): upgrade to 0.1.8 or later

  ```sh
  pip install "pyspector>=0.1.8"
  ```


## Affected products

- Parzivalhack Pyspector
- pyspector (PyPI) <= 0.1.7, ECOSYSTEM:introduced=0,fixed=0.1.8

## Identifiers

- CVE-2026-41206
- GHSA-vp22-38m5-r39r
- PYSEC-2026-3031

## References

- [https://api.github.com/users/fg0x0](https://api.github.com/users/fg0x0)
- [https://github.com/fg0x0](https://github.com/fg0x0)
- [https://api.github.com/users/fg0x0/gists%7B/gist_id%7D](https://api.github.com/users/fg0x0/gists%7B/gist_id%7D)
- [https://api.github.com/users/fg0x0/repos](https://api.github.com/users/fg0x0/repos)
- [https://avatars.githubusercontent.com/u/35772301?v=4](https://avatars.githubusercontent.com/u/35772301?v=4)
- [https://api.github.com/users/fg0x0/events%7B/privacy%7D](https://api.github.com/users/fg0x0/events%7B/privacy%7D)

## Related threats

- [PYSEC-2026-3029 - Stored XSS in PySpector HTML Report Generation leads to Javascript Code Execution](https://junglewise.ai/threats/cve-2026-33140-pyspector-stored-xss-in-html-report-generation)
- [PYSEC-2026-3030 - PySpector has a Plugin Sandbox Bypass leads to Arbitrary Code Execution](https://junglewise.ai/threats/cve-2026-33139-pyspector-has-a-plugin-sandbox-bypass-leads-to-arbitrary-code)
