Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-27952: CWE-94: Improper Control of Generation of Code ('Code Injection') in Agenta-AI agenta-api

0
High
VulnerabilityCVE-2026-27952cvecve-2026-27952cwe-94
Published: Thu Feb 26 2026 (02/26/2026, 01:38:00 UTC)
Source: CVE Database V5
Vendor/Project: Agenta-AI
Product: agenta-api

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.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/05/2026, 10:04:46 UTC

Technical Analysis

Agenta-AI's agenta-api prior to version 0.48.1 contains a critical code injection vulnerability (CVE-2026-27952) classified under CWE-94 due to improper control over code generation and execution. The platform uses a custom code evaluator that runs user-supplied Python code server-side within the API process. To restrict potentially dangerous operations, Agenta employed RestrictedPython as a sandboxing mechanism. However, the sandbox incorrectly whitelisted the numpy package as safe, which is problematic because numpy.ma.core.inspect exposes Python's introspection capabilities, including access to sys.modules. This exposure enables an authenticated user to bypass sandbox restrictions and execute arbitrary system-level commands, such as via os.system, effectively escaping the sandbox. This vulnerability is limited to the self-hosted API server component and does not affect the standalone SDK. The flaw was addressed in version 0.48.1 by removing numpy from the sandbox allowlist. Furthermore, from version 0.60 onward, the RestrictedPython sandbox was completely removed and replaced with a different execution model, mitigating this class of vulnerabilities. The vulnerability has a CVSS 3.1 base score of 8.8, indicating a high severity with network attack vector, low attack complexity, requiring privileges but no user interaction, and impacting confidentiality, integrity, and availability.

Potential Impact

This vulnerability allows authenticated users to execute arbitrary code on the agenta-api server, potentially leading to full system compromise. Attackers can leverage this to access sensitive data, modify or delete critical information, disrupt service availability, or pivot to other systems within the network. Since the vulnerability requires authentication, insider threats or compromised credentials pose a significant risk. Organizations running self-hosted instances of agenta-api prior to version 0.48.1 are at risk of unauthorized control over their AI operations platform, which could undermine trust in AI workflows and data integrity. The impact extends to any environment where agenta-api is used to evaluate or execute user-supplied code, especially in multi-tenant or collaborative settings. The compromise could also facilitate lateral movement and further exploitation within enterprise networks.

Mitigation Recommendations

Organizations should immediately upgrade agenta-api to version 0.48.1 or later, where numpy is removed from the sandbox allowlist, or preferably to version 0.60+ which replaces the sandbox entirely. Until upgrades are applied, restrict access to the API server to trusted users only and enforce strong authentication and monitoring to detect suspicious activity. Review and limit user permissions to minimize the risk of malicious code execution. Implement network segmentation and host-based intrusion detection to identify anomalous behavior indicative of sandbox escape attempts. Conduct thorough code reviews and security testing of any custom code evaluator configurations. Additionally, consider deploying runtime application self-protection (RASP) or endpoint detection and response (EDR) solutions to detect and block exploitation attempts. Regularly audit logs for unusual commands or system calls originating from the API process.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-02-25T03:11:36.690Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 699fabd8b7ef31ef0b7dea12

Added to database: 2/26/2026, 2:11:36 AM

Last enriched: 3/5/2026, 10:04:46 AM

Last updated: 4/12/2026, 8:06:43 AM

Views: 99

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses