Mesop is a Python-based UI framework that allows users to build web applications. In versions 1.2.2 and below, 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. 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...). This issue has been fixed in version 1.2.3.
The AI framework package Mesop contains an auxiliary Flask server (ai/sandbox/wsgi_app.py) with an /exec-py endpoint. This endpoint accepts HTTP POST requests with a code parameter containing Python code encoded in Base64. The submitted code is decoded, written to the operating system disk, and then executed using the execute_module() function — without any verification of the caller's identity. Anyone able to submit an HTTP request to this server gains immediate ability to execute arbitrary commands with the privileges of the server process.
An attacker without any authentication can execute arbitrary code on the hosting machine, leading to full server takeover, data leakage, installation of malicious software, or further lateral movement in the network.
Update Mesop to version 1.2.3, where the vulnerability has been fixed. Until the update is applied, it is recommended to block network access to the /exec-py endpoint and ensure that the Flask debugging server from the ai/sandbox module is not exposed publicly.
Mesop (mesop-dev/mesop) in versions 1.2.2 and below, if deployed with the accessible ai/sandbox/wsgi_app.py module
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HMesop Dev Mesop
APPMesop-Dev< 1.2.3