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

New CVE Detected

CVE-2026-51872 – Code Injection / Remote Code Execution – Devika v1.0

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

Summary

CVE-2026-51872 is a critical code injection vulnerability in Devika v1.0, an open-source AI software engineering agent. The flaw resides in the Runner.run_code function in src/agents/runner/runner.py, which executes LLM-generated commands without validating or sanitizing their contents, allowing an attacker to achieve arbitrary code execution on the host running Devika. The vulnerability carries a CVSS v3.1 base score of 9.8 (Critical) and requires no authentication or user interaction to exploit.

Technical details

  • Root cause: Runner.run_code processes structured responses returned by the LLM backend and only checks for the presence of expected fields (e.g., action and response) without inspecting or sanitizing the actual contents of the embedded command data.
  • Execution path: When the parsed action indicates a command should be run, the command string taken from the LLM response is split (e.g., via command.split(" ")) and passed directly to a subprocess execution call, with no whitelisting, sandboxing, or input validation applied.
  • Trigger conditions: An attacker who can influence the content processed by the LLM — for example through crafted user prompts or prompt injection against the agent — can cause the model to emit a malicious command/code payload that Devika will execute verbatim.
  • Attack vector: Network — exploitation does not require local access, prior authentication, or victim interaction, and can be delivered through normal interaction with an exposed Devika instance (e.g., its Socket.IO-based chat interface).
  • Impact: Full compromise of confidentiality, integrity, and availability of the host system, including arbitrary file creation/modification and arbitrary code execution with the privileges of the Devika service process.

Affected software

  • Devika v1.0 (stitionai/devika) — src/agents/runner/runner.py, Runner.run_code function

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 or fixed version from the Devika maintainers has been confirmed. Security teams should monitor the upstream stitionai/devika repository for a fix addressing runner.py and upgrade as soon as a patched version is available.
  • If no patch is available:
    • Do not expose Devika instances directly to the internet or untrusted networks; restrict access to trusted internal users via VPN or firewall allow-listing.
    • Run Devika inside an isolated, sandboxed environment (e.g., container with restricted filesystem/network access and no sensitive credentials) so that arbitrary code execution cannot impact other systems.
    • Review and restrict the permissions of the service account running Devika to the minimum required.
    • Disable or tightly control any functionality that allows the agent to execute LLM-generated commands or code against the host, and audit logs for unexpected subprocess executions.
    • Treat all LLM-generated output used by the agent as untrusted input and avoid passing it to command execution or file system operations without independent validation.

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