CVE-2026-33057: Mesop Remote Code Execution Vulnerability
CRITICALCVE-2026-33057 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Mesop libraries in the PyPI ecosystem. The issue involves mesop affected by unauthenticated remote code execution via test suite route /exec-py. Remediation is available by upgrading affected packages to version 1.2.3.
CVE-2026-33057 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-33057
To remediate this vulnerability, upgrade all affected Mesop dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install mesop>=1.2.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show mesop
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-33057, inspect your installed packages using pip:
pip show mesop
Analyze the terminal output to locate any version of Mesop in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.3), your application is affected.
Note: The pip show mesop command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Mesop, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-33057 Affected Mesop Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mesop
|
PyPI |
< 1.2.3
|
1.2.3
|
References
Frequently Asked Questions
What is CVE-2026-33057?
Which Mesop versions are affected?
What version fixes CVE-2026-33057?
Is mesop affected?
What is the CVSS score of CVE-2026-33057?
What CWE is associated with CVE-2026-33057?
How can I check PyPI dependencies for CVE-2026-33057?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gjgx-rvqr-6w6v",
"modified" : "2026-03-20T21:23:51Z",
"published" : "2026-03-18T20:05:00Z",
"aliases" : [ "CVE-2026-33057" ],
"summary" : "Mesop Affected by Unauthenticated Remote Code Execution via Test Suite Route /exec-py",
"details" : "#### Summary\nAn 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.\n\n#### Details\nThe 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...)`.\n\n```python\n# ai/sandbox/wsgi_app.py\n@flask_app.route(\"/exec-py\", methods=[\"POST\"])\ndef exec_py_route():\n code = base64.urlsafe_b64decode(request.form.get(\"code\"))\n # ... code is blindly written to file and forcefully executed\n```\n\n#### PoC\n```bash\n# Payload:\n# import os\n# os.system('echo \"pwned by attacker\" > /tmp/pwned.txt')\n# \n# Base64 string represents the identical payload block above: \n# aW1wb3J0IG9zCm9zLnN5c3RlbSgnZWNobyAicHduZWQgYnkgYXR0YWNrZXIiID4gL3RtcC9wd25lZC50eHQnKQ==\n\ncurl -X POST http://<target_ip_address_hosting_sandbox>:port/exec-py \\\n -H \"Content-Type: application/x-www-form-urlencoded\" \\\n -d \"code=aW1wb3J0IG9zCm9zLnN5c3RlbSgnZWNobyAicHduZWQgYnkgYXR0YWNrZXIiID4gL3RtcC9wd25lZC50eHQnKQ==\"\n\n# Validate exploitation target execution natively:\n# $ cat /tmp/pwned.txt\n# pwned by attacker\n```\n\n#### Impact\nThis 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "mesop"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.2.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mesop-dev/mesop/security/advisories/GHSA-gjgx-rvqr-6w6v"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33057"
}, {
"type" : "WEB",
"url" : "https://github.com/mesop-dev/mesop/commit/825f55970c20686de3f28e2c66df4d74e9d4db47"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mesop-dev/mesop"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-18T20:05:00Z",
"nvd_published_at" : "2026-03-20T08:16:11Z"
}
}