Skip to main content

Python CVE-2026-33057

CRITICAL
Code Injection (CWE-94)
2026-03-18 https://github.com/mesop-dev/mesop GHSA-gjgx-rvqr-6w6v
9.8
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send HTTP POST request to /exec-py endpoint
  2. Exploit
    Submit base64-encoded Python code in parameter
  3. Execution
    Flask server decodes and evaluates code
  4. Impact
    Execute 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 /exec-py endpoint in the AI package's ai/sandbox/wsgi_app.py Flask debugging server if it is exposed on the network. Requires HTTP POST access to the vulnerable endpoint with base64-encoded Python code in the code parameter. No victim interaction needed.

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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

pypi mesop fix: 1.2.3

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

GitHub Advisory PRIMARY 9.8 CRITICAL
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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch released
Mar 31, 2026 - 21:13 nvd
Patch available
CVE Published
Mar 18, 2026 - 20:05 nvd
CRITICAL 9.8

DescriptionGitHub 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...).

python
# 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 executed
PoC
bash
# 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 attacker
Impact

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

Why It Matters

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.

Business Impact: Severe
Compensating Controls

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

EPSS Score
0.3%
Top 49% exploitable
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

69
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

Code Injection CRITICAL

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

pkg:pip/mesop

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy