PHP2Shell : See if you’re affected with a free external attack surface scan. Click Here > 

New CVE Detected

CVE-2026-51856 – Remote Code Execution – AgentScope 1.0.18–1.0.19.post1

Be the first to know when new zero-days emerge:

Summary

CVE-2026-51856 is a critical remote code execution vulnerability in AgentScope, an open-source framework for building LLM agents. When a deployment’s RealtimeAgent WebSocket session exposes the execute_python_code tool, a remote, unauthenticated WebSocket client can converse with the agent in a way that causes the underlying language model to invoke that tool, resulting in arbitrary Python code execution in the service environment. The flaw has a CVSS v3.1 base score of 9.8 (Critical).

Technical details

  • Root cause: RealtimeAgent._acting forwards model-produced tool calls directly to Toolkit.call_tool_function, which executes the execute_python_code tool without any additional approval step or sandboxing/isolation boundary.
  • Trigger condition: The vulnerability requires that a RealtimeAgent session has execute_python_code registered as an available tool, which is a common configuration for agents intended to run code on behalf of users.
  • Attack vector: A remote client connects to the exposed WebSocket endpoint (e.g., a ws:///wss:// RealtimeAgent session) and, through normal conversational prompting, induces the agent/model to call the execute_python_code tool with attacker-chosen code.
  • Impact: Full arbitrary code execution in the context of the service process, which can lead to complete compromise of confidentiality, integrity, and availability of the host running AgentScope. No authentication or user interaction beyond the WebSocket connection is required.

Affected software

  • AgentScope versions 1.0.18, 1.0.19, and 1.0.19.post1 when a RealtimeAgent session has the execute_python_code tool enabled.

Severity

  • CVSS v3.1 Base Score: 9.8 (Critical)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Mitigation and recommended actions

  • Immediate: As of this writing, no official patched release has been confirmed by the vendor. Security teams should monitor the AgentScope GitHub repository for a fixed release and upgrade as soon as one is available.
  • Workarounds:
    • Disable or remove the execute_python_code tool (and similar code/shell-execution tools) from any RealtimeAgent session that accepts connections from untrusted or unauthenticated remote clients.
    • Do not expose RealtimeAgent WebSocket endpoints directly to the internet; place them behind authentication, network access controls, or a gateway that restricts connections to trusted sources.
    • If code execution tools must be exposed, run the agent process in an isolated, sandboxed, or containerized environment with minimal privileges to limit the blast radius of arbitrary code execution.
    • Monitor WebSocket-exposed agent services for anomalous tool-invocation patterns or unexpected code execution tool calls.

References

Are you exposed?

Get a free report of your organization’s exposure to this CVE and threat

How IONIX’s External Exposure Management Platform Detects and Validates
Zero-Days to Shrink MTTR

1

Map your entire attack surface (continously)

IONIX uses multi-factor discovery methods, including DNS analysis, certificate mapping, metadata inspection, and more, to automatically map every internet-facing asset across your environment. This includes cloud instances, third-party platforms, shadow IT, and even forgotten infrastructure that traditional tools miss.

2

Monitor for new CVEs

Dozens of threat intel feeds using agentic technology are continuously analyzed to detect the appearance of proof-of-concept code, exploit kits, and indicators of active targeting. IONIX goes further by applying AI to proactively evaluate whether emerging vulnerabilities are likely to be exploited, even before PoCs go public.

3

Identify Potential External Exposures

Not all CVEs matter. IONIX filters vulnerabilities by asking attacker-centric questions: Can it be reached from the internet? Does it require authentication? Is it being exploited in the wild? This dramatically reduces noise and focuses teams on threats that can actually be weaponized.

4

Create Safe, Scalable Exploit Validations

IONIX transforms real-world PoCs into safe, non-intrusive test payloads that can be run in production environments without disruption. These simulations are precisely targeted to the systems that are vulnerable, ensuring rapid validation without unnecessary load.

5

Execute Exploit Validations

By combining context about software stack, versioning, exposure status, and reachability, IONIX ensures that only the right payloads are executed against the right assets, maximizing efficiency and minimizing risk.

6

Drive Fast and Actionable Remediation

Results are routed through integrations with ticketing, SOAR, and SIEM tools. Issues are written in plain language, bundled into remediation clusters, and prioritized based on asset criticality, exploitability, and blast radius. This shortens mean time to remediation (MTTR) and empowers teams to act with confidence.

Are you exposed?

Get a free report of your organization’s exposure to this CVE and threat

Subscribe to Threat Center RSS

Copy/paste the link below into your preferred RSS reader or follow these instructions to subscribe to Slack alerts.

Get Real-Time CVE Alerts to Your Email

Be the first to know when new zero-days emerge