# CVE-2026-27952: Agenta has Python Sandbox Escape, Leading to Remote Code Execution (RCE)

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.58%, higher than 48% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-02-26T01:38:00.760Z
- Modified: 2026-06-17T10:27:58.043Z
- Also known as: PYSEC-2026-6, GHSA-pmgp-2m3v-34mq
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- Agenta-AI agenta-api: < 0.48.1
- agentatech agenta: before 0.48.1
- agenta (PyPI): before 0.48.1

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://github.com/Agenta-AI/agenta/security/advisories/GHSA-pmgp-2m3v-34mq> (exploit, evidence, vendor-advisory)

## Sources

- CVE List: [CVE-2026-27952](https://www.cve.org/CVERecord?id=CVE-2026-27952), CVE Terms of Use, modified 2026-02-26
- NVD: [CVE-2026-27952](https://nvd.nist.gov/vuln/detail/CVE-2026-27952), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-6](https://osv.dev/vulnerability/PYSEC-2026-6), CC-BY-4.0, modified 2026-05-20

---

Page: https://cve.day/CVE-2026-27952 · Whole record: https://cve.day/CVE-2026-27952.json · Rebuilt by cve.day 2026-11-25T22:59:14.940Z
