
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-41206 is a plugin system bypass vulnerability in PySpector, a static analysis security testing (SAST) framework for Python, that allows arbitrary code execution via an incomplete AST-based blocklist. The flaw resides in PluginSecurity.validate_plugin_code, which can be circumvented using standard Python constructs not covered by the blocklist. All versions prior to 0.1.8 are affected. The vulnerability was published on April 23, 2026, with a fix released in version 0.1.8. It carries a CVSS v3.1 score of 7.8 (High) and a CVSS v4.0 score of 6.9 (Medium) (GitHub Advisory).
The root cause is classified as CWE-184 (Incomplete List of Disallowed Inputs). PySpector's PluginSecurity.validate_plugin_code method uses an AST-based visitor to check plugin code against a fatal_calls set of explicitly forbidden identifiers (e.g., eval, exec, os.system, subprocess.Popen). This blocklist approach is inherently incomplete: importlib.import_module was not blocked, allowing runtime loading of os or subprocess; dynamic attribute chains using dunder attributes (__class__.__mro__) could traverse the class hierarchy; ctypes was unblocked for native library calls; __builtins__ dictionary access exposed all built-in callables; types.CodeType allowed raw code object construction; and aliased imports of blocked modules evaded detection. Because the validator gates plugin installation with a pass/fail result, a bypass causes untrusted plugin code to execute with full PySpector process privileges. A public PoC using importlib.import_module('os') followed by mod.system('id > /tmp/pwned') demonstrates the bypass (GitHub Advisory).
Successful exploitation allows an attacker who can supply a malicious plugin file to execute arbitrary operating system commands with the full privileges of the PySpector process. The static analysis check provides a false sense of security, as it can be trivially circumvented using standard library modules present in every Python installation. This results in high confidentiality and integrity impact (full process compromise, potential data exfiltration and unauthorized modification) and low availability impact within the vulnerable system scope (GitHub Advisory).
A public proof-of-concept exploit is available in the GitHub security advisory, demonstrating the bypass using importlib.import_module to load os and execute a shell command. The attack requires local access and user interaction (a user must install and execute the malicious plugin), with no privileges required at the network level. There is no evidence of in-the-wild exploitation at this time, and the vulnerability is not listed in the CISA KEV catalog. The EPSS score is approximately 0.023% (GitHub Advisory).
importlib.import_module (or another unblocked construct) to load a dangerous module and execute an OS command, e.g.:import importlib
mod = importlib.import_module('os')
mod.system('id > /tmp/pwned').py file to a target user or system running PySpector versions ≤0.1.7, for example by distributing it as a legitimate-looking plugin package.--trust flag), which invokes PluginSecurity.validate_plugin_code on the supplied file.fatal_calls blocklist does not include importlib.import_module, so the plugin passes the AST-based security check without triggering any alert./tmp/pwned or similar artifacts); new or unfamiliar .py plugin files in the PySpector plugin directory containing importlib, ctypes, __builtins__, or __class__.__mro__ references.sh, bash, id, curl, wget); unexpected network connections originating from the PySpector process.importlib.import_module or other non-blocked dynamic constructs; absence of expected rejection messages for suspicious plugin code.Upgrade PySpector to version 0.1.8 or later, which significantly expands the blocklist to include importlib, ctypes, cffi, types, and related constructs, and adopts a fail-closed design principle for the plugin validator. Until patching is possible, restrict plugin installation to trusted, internally reviewed sources only and manually audit any plugin files before installation. Limit which users or processes have permission to install plugins in PySpector deployments (GitHub Advisory, Patch Commit).
The vulnerability was reported by researcher fg0x0 and disclosed via GitHub's security advisory program. The advisory was rated "Moderate" by the maintainer, reflecting the local attack vector and required user interaction. No significant broader media coverage or notable community commentary beyond the advisory itself has been identified.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."