high CVSS 8.8

CVE-2026-27952·Python vulnerability

Agenta is an open-source LLMOps platform. In Agenta-API prior to version 0.48.1, a Python sandbox escape vulnerability existed in Agenta's custom code evaluator. Agenta used RestrictedPython as a sandboxing mechanism for user-supplied evaluator code, but incorrectly whitelisted the `numpy` package as safe within the sandbox. This allowed authenticated users to bypass the sandbox and achieve arbitrary code execution on the API server. The escape path was through `numpy.ma.core.inspect`, which exposes Python's introspection utilities — including `sys.modules` — thereby providing access to unfiltered system-level functionality like `os.system`. This vulnerability affects the Agenta self-hosted platform (API server), not the SDK when used as a standalone Python library. The custom code evaluator runs server-side within the API process. The issue is fixed in v0.48.1 by removing `numpy` from the sandbox allowlist. In later versions (v0.60+), the RestrictedPython sandbox was removed entirely and replaced with a different execution model.

Severity
high
Software
Python
Fixed in
0.48.1
Published
2026-02-26

Affected versions

Until: 0.48.1

Fixed in: 0.48.1

How to fix this CVE

If you are running Agenta self-hosted API server, upgrade to version 0.48.1 or later immediately to remove the unsafe numpy whitelisting from the RestrictedPython sandbox. Organizations using Agenta v0.60+ benefit from an architecture redesign that eliminated the RestrictedPython sandbox entirely. Verify your deployment version and apply the patch as soon as possible, since this vulnerability allows authenticated users to execute arbitrary code on your API infrastructure.

sudo dnf update python3

Defensia detects this vulnerability

WAF mitigation (if patching is not yet possible)

Add this rule to your WAF to block exploitation attempts while you schedule the patch.

Implement authentication-based rate limiting on all API endpoints that expose the custom code evaluator to prevent credential-based brute force attacks that could lead to exploitation of this vulnerability by low-privilege accounts.

How to check if you are affected

  1. Step 1: Check your Agenta installation version by running `pip show agenta` or `pip show agenta-api` and confirm the version is below 0.48.1
  2. Step 2: If running Agenta API, verify RestrictedPython is in your requirements by running `pip show RestrictedPython` and check if numpy is in your allowed sandbox packages in the evaluator configuration
  3. Step 3: Search API server logs for unexpected numpy introspection patterns: `grep -r 'numpy.ma.core.inspect\|sys.modules' /var/log/agenta* 2>/dev/null` or check for suspicious os.system calls in evaluator execution logs
  4. Step 4: After patching, re-run `pip show agenta-api` and confirm version is 0.48.1 or higher, then restart the API service with `sudo systemctl restart agenta-api` (adjust service name as needed)

FAQ

What is CVE-2026-27952?

CVE-2026-27952 is a sandbox escape vulnerability in Agenta's custom code evaluator where numpy was incorrectly whitelisted in RestrictedPython, allowing authenticated attackers to access introspection utilities and execute arbitrary system commands on the API server.

Is CVE-2026-27952 being actively exploited?

No, this vulnerability is not currently listed in the CISA KEV catalog and no public exploits have been disclosed, but the attack surface exists for any authenticated user with access to Agenta's custom evaluator feature.

What versions of Agenta are affected by CVE-2026-27952?

All versions of Agenta-API prior to 0.48.1 are affected; the fix was applied in 0.48.1 by removing numpy from the sandbox allowlist, and a complete architectural redesign occurred in v0.60+.

How do I check if my server is vulnerable to CVE-2026-27952?

Run `pip show agenta-api` and check if the version is below 0.48.1; if it is, your Agenta API server is vulnerable and requires immediate patching.

Does Defensia detect CVE-2026-27952?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Agenta-API is installed on a monitored server, CVE-2026-27952 will appear in your dashboard with remediation steps.

Related Python CVEs

CVE-2026-33054CVSS 10Mesop is a Python-based UI framework that allows users to build web applications. Versions 1.2.2 and below contain a Path Traversal vulnerability that allows any user supplying an untrusted state_token through the UI stream payload to arbitrarily target files on the disk under the standard file-based runtime backend. This can result in application denial of service (via crash loops when reading non-msgpack target files as configurations), or arbitrary file manipulation. This vulnerability heavily exposes systems hosted utilizing FileStateSessionBackend. Unauthorized malicious actors could interact with arbitrary payloads overwriting or explicitly removing underlying service resources natively outside the application bounds. This issue has been fixed in version 1.2.3.
CVE-2026-28505CVSS 10Tautulli is a Python based monitoring and tracking tool for Plex Media Server. Prior to version 2.17.0, the str_eval() function in notification_handler.py implements a sandboxed eval() for notification text templates. The sandbox attempts to restrict callable names by inspecting code.co_names of the compiled code object. However, co_names only contains names from the outer code object. When a lambda expression is used, it creates a nested code object whose attribute accesses are stored in code.co_consts, NOT in code.co_names. The sandbox never inspects nested code objects. This issue has been patched in version 2.17.0.
CVE-2026-34938CVSS 10PraisonAI is a multi-agent teams system. Prior to version 1.5.90, execute_code() in praisonai-agents runs attacker-controlled Python inside a three-layer sandbox that can be fully bypassed by passing a str subclass with an overridden startswith() method to the _safe_getattr wrapper, achieving arbitrary OS command execution on the host. This issue has been patched in version 1.5.90.
CVE-2026-25632CVSS 10EPyT-Flow is a Python package designed for the easy generation of hydraulic and water quality scenario data of water distribution networks. Prior to 0.16.1, EPyT-Flow’s REST API parses attacker-controlled JSON request bodies using a custom deserializer (my_load_from_json) that supports a type field. When type is present, the deserializer dynamically imports an attacker-specified module/class and instantiates it with attacker-supplied arguments. This allows invoking dangerous classes such as subprocess.Popen, which can lead to OS command execution during JSON parsing. This also affects the loading of JSON files. This vulnerability is fixed in 0.16.1.
CVE-2025-54381CVSS 9.9BentoML is a Python library for building online serving systems optimized for AI apps and model inference. In versions 1.4.0 until 1.4.19, the file upload processing system contains an SSRF vulnerability that allows unauthenticated remote attackers to force the server to make arbitrary HTTP requests. The vulnerability stems from the multipart form data and JSON request handlers, which automatically download files from user-provided URLs without validating whether those URLs point to internal network addresses, cloud metadata endpoints, or other restricted resources. The documentation explicitly promotes this URL-based file upload feature, making it an intended design that exposes all deployed services to SSRF attacks by default. Version 1.4.19 contains a patch for the issue.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-27952. Free for 1 server.

Get started free