CVE-2026-41206·Python vulnerability
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.
- Severity
- high
- Software
- Python
- Fixed in
- 0.1.8
- Published
- 2026-04-23
Affected versions
Until: 0.1.8
Fixed in: 0.1.8
How to fix this CVE
PySpector versions before 0.1.8 contain an incomplete plugin security validator that allows attackers to bypass blocklist protections through unvalidated Python constructs, leading to arbitrary code execution. Immediately upgrade PySpector to version 0.1.8 or later and audit any custom plugins that may have been deployed. Review plugin installation logs to identify whether untrusted or third-party plugins were loaded during the vulnerable period.
sudo dnf update python3-pyspector || sudo pip3 install --upgrade pyspector>=0.1.8Defensia detects this vulnerability
How to check if you are affected
- Check PySpector version: pip3 show pyspector | grep Version
- Verify plugin directory permissions: ls -la ~/.pyspector/plugins/ or similar plugin storage location used by your deployment
- Search process logs for PySpector execution with untrusted plugins: grep -r 'PySpector' /var/log/ | grep -i plugin
- Confirm fix by running: python3 -c 'import pyspector; print(pyspector.__version__)' and verify version >= 0.1.8
FAQ
What is CVE-2026-41206?
CVE-2026-41206 is a plugin security bypass vulnerability in PySpector's static analysis framework where the AST-based blocklist in the plugin validator is incomplete, allowing attackers to craft malicious plugins that execute arbitrary code when loaded by PySpector.
Is CVE-2026-41206 being actively exploited?
No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available, though the attack surface exists if untrusted plugins can be supplied to a PySpector installation.
What versions of PySpector are affected by CVE-2026-41206?
All versions of PySpector prior to and including 0.1.7 are vulnerable; version 0.1.8 and later contain the fix.
How do I check if my server is vulnerable to CVE-2026-41206?
Run 'pip3 show pyspector | grep Version' and compare the version number to 0.1.8. If your version is less than 0.1.8, your installation is vulnerable.
Does Defensia detect CVE-2026-41206?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PySpector is installed on a monitored server, CVE-2026-41206 will appear in your dashboard with remediation steps.
Related Python CVEs
References
- https://github.com/ParzivalHack/PySpector/commit/3c9547157fc07396f22b26b3484a9a91eba98555
- https://github.com/ParzivalHack/PySpector/commit/4e279e078c53d760fd321ff9b698d683c65ccb8e
- https://github.com/ParzivalHack/PySpector/security/advisories/GHSA-vp22-38m5-r39r
- https://github.com/ParzivalHack/PySpector/security/advisories/GHSA-vp22-38m5-r39r
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-41206. Free for 1 server.
Get started free