Description
In agentscope 1.0.18, 1.0.19, and 1.0.19 when the RealtimeAgent session exposes execute_python_code as an available tool, a remote WebSocket user can prompt the agent to call that tool and run Python code in the service environment. In the validated path, RealtimeAgent._acting forwards the model-produced tool call to Toolkit.call_tool_function, which invokes execute_python_code without an additional approval or isolation boundary on that path.
Published: 2026-09-30
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Patch Immediately
AI Analysis

Impact

It appears that Agentscope 1.0.18 and 1.0.19 contain a flaw in the RealtimeAgent._acting method, which forwards model‑generated tool calls directly to the execute_python_code function without any additional approval or isolation. This flaw allows a user who can connect to the agent via WebSocket to instruct the agent to run arbitrary Python code in the service environment, effectively granting remote code execution. By its nature, the flaw exploits the lack of an approval boundary, so it is inferred that any tool call triggered by the model can be executed. The resulting impact could include full control over the host, persistence, data exfiltration, and lateral movement.

Affected Systems

The vulnerability affects the open‑source Agentscope project, specifically releases 1.0.18 and 1.0.19. No vendor patch is listed, and the issue is tracked on the project's GitHub issue tracker and community gist. Users running those versions and exposing the execute_python_code tool in a WebSocket session are at risk. It is inferred that the environment in which Agentscope runs may be a production service where the agent is exposed over WebSocket.

Risk and Exploitability

The CVSS score of 9.8 indicates a critical severity. The EPSS score is < 1%, suggesting a relatively low but nonzero probability of exploitation, and the vulnerability is not yet listed in the CISA KEV catalog. Because the flaw allows direct execution of arbitrary code once a WebSocket connection exists, the risk posture remains high. The attack path requires only the ability to send a tool‑call message via WebSocket, so any user with network access to the service can trigger exploitation. The lack of authentication beyond the WebSocket level implies that the vulnerability is readily exploitable in scenarios where the WebSocket is exposed to untrusted clients.

Generated by OpenCVE AI on October 1, 2026 at 19:34 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Agentscope to a patched version that removes or protects the execute_python_code tool
  • If an upgrade is unavailable, remove or disable the execute_python_code tool from the RealtimeAgent exposure to prevent unintended execution
  • Restrict WebSocket connections to trusted clients and enforce authentication and authorization checks

Generated by OpenCVE AI on October 1, 2026 at 19:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 02 Oct 2026 09:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 01 Oct 2026 20:00:00 +0000

Type Values Removed Values Added
Title Arbitrary Python Code Execution via Exposed execute_python_code Tool in Agentscope RealtimeAgent

Thu, 01 Oct 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Thu, 01 Oct 2026 00:15:00 +0000

Type Values Removed Values Added
Title Arbitrary Python Code Execution via Exposed execute_python_code Tool in Agentscope RealtimeAgent
Weaknesses CWE-94

Wed, 30 Sep 2026 21:00:00 +0000

Type Values Removed Values Added
Description In agentscope 1.0.18, 1.0.19, and 1.0.19 when the RealtimeAgent session exposes execute_python_code as an available tool, a remote WebSocket user can prompt the agent to call that tool and run Python code in the service environment. In the validated path, RealtimeAgent._acting forwards the model-produced tool call to Toolkit.call_tool_function, which invokes execute_python_code without an additional approval or isolation boundary on that path.
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-10-01T16:09:52.586Z

Reserved: 2026-06-08T00:00:00.000Z

Link: CVE-2026-51856

cve-icon Vulnrichment

Updated: 2026-10-01T16:09:46.638Z

cve-icon NVD

Status : Deferred

Published: 2026-09-30T21:17:11.520

Modified: 2026-10-01T17:17:25.740

Link: CVE-2026-51856

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-01T19:45:03Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')