/

CVE-2026-109442

Severity:

CRITICAL RISK

(9.8)

Unauthenticated RCE (CWE-306) in piflow Chat Agent API

CVE-2026-109442

Deferred

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-306

Impact:

Remote Code Execution and Secret Exposure

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

piflow's DeepAgents chat agent exposes unauthenticated chat endpoints that can be used to invoke a shell-execution tool. A remote attacker may execute arbitrary operating-system commands and access secrets when the service is reachable and the agent permits tool execution without approval or command restrictions.

piflow's DeepAgents chat agent exposes unauthenticated chat endpoints that can be used to invoke a shell-execution tool. A remote attacker may execute arbitrary operating-system commands and access secrets when the service is reachable and the agent permits tool execution without approval or command restrictions.

Affected context

The vulnerability occurs in piflow deployments that expose the DeepAgents chat agent through the POST /chat or POST /chat/stream endpoints without an effective authentication boundary. Risk is higher when the agent has access to the exec_shell tool, runs with useful operating-system privileges, or shares its environment with LLM credentials, database credentials, and other sensitive configuration.

The vulnerability occurs in piflow deployments that expose the DeepAgents chat agent through the POST /chat or POST /chat/stream endpoints without an effective authentication boundary. Risk is higher when the agent has access to the exec_shell tool, runs with useful operating-system privileges, or shares its environment with LLM credentials, database credentials, and other sensitive configuration.

Exploit preconditions

  • Attack surface: Network-accessible HTTP chat endpoints
  • Required access: No authentication is required when the affected endpoints are exposed without an external access-control layer
  • Trigger point: A chat request that causes the agent to invoke the exec_shell tool
  • Why exploitation is possible: The endpoints accept agent instructions without authentication, human approval, or an effective command allow-list, allowing attacker-controlled requests to reach subprocess.run
  • Attack surface: Network-accessible HTTP chat endpoints
  • Required access: No authentication is required when the affected endpoints are exposed without an external access-control layer
  • Trigger point: A chat request that causes the agent to invoke the exec_shell tool
  • Why exploitation is possible: The endpoints accept agent instructions without authentication, human approval, or an effective command allow-list, allowing attacker-controlled requests to reach subprocess.run

Why this happens

The primary issue is missing authentication and authorization on sensitive chat endpoints, mapping to CWE-306: Missing Authentication for Critical Function. The design also permits an AI agent to reach a general-purpose shell command runner without sufficiently restricting tool invocation or command content. This insecure pattern combines an unauthenticated control surface with excessive execution capability, allowing untrusted requests to influence operating-system process execution.

The primary issue is missing authentication and authorization on sensitive chat endpoints, mapping to CWE-306: Missing Authentication for Critical Function. The design also permits an AI agent to reach a general-purpose shell command runner without sufficiently restricting tool invocation or command content. This insecure pattern combines an unauthenticated control surface with excessive execution capability, allowing untrusted requests to influence operating-system process execution.

Potential impact

  • An attacker may execute arbitrary commands in the piflow service environment.
  • Environment variables may be exposed, including LLM API keys and database credentials.
  • The attacker could modify application data, workflows, or local files.
  • Compromised credentials could enable access to external services or connected databases.
  • The service account or host may be used for lateral movement, depending on its privileges and network access.
  • An attacker may execute arbitrary commands in the piflow service environment.
  • Environment variables may be exposed, including LLM API keys and database credentials.
  • The attacker could modify application data, workflows, or local files.
  • Compromised credentials could enable access to external services or connected databases.
  • The service account or host may be used for lateral movement, depending on its privileges and network access.

General mitigation guidance

Mitigation generally focuses on enforcing authentication and authorization before any agent request reaches sensitive functionality.

Common defensive patterns include:

  • Require strong authentication and least-privilege authorization for all chat endpoints.
  • Place the service behind an access-control boundary with secure-by-default denial for unauthenticated requests.
  • Disable shell-capable tools unless they are explicitly required for a narrowly defined workflow.
  • Replace general-purpose command execution with constrained, purpose-built operations and strict allow-lists.
  • Require explicit human approval for high-impact tools or commands.
  • Run the agent with a dedicated low-privilege identity, restricted filesystem access, and limited network permissions.
  • Keep secrets outside broadly readable process environments and limit their exposure to individual operations.
  • Treat agent messages and tool arguments as untrusted input rather than as authorized instructions.

Mitigation generally focuses on enforcing authentication and authorization before any agent request reaches sensitive functionality.

Common defensive patterns include:

  • Require strong authentication and least-privilege authorization for all chat endpoints.
  • Place the service behind an access-control boundary with secure-by-default denial for unauthenticated requests.
  • Disable shell-capable tools unless they are explicitly required for a narrowly defined workflow.
  • Replace general-purpose command execution with constrained, purpose-built operations and strict allow-lists.
  • Require explicit human approval for high-impact tools or commands.
  • Run the agent with a dedicated low-privilege identity, restricted filesystem access, and limited network permissions.
  • Keep secrets outside broadly readable process environments and limit their exposure to individual operations.
  • Treat agent messages and tool arguments as untrusted input rather than as authorized instructions.

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying unauthenticated routes connected to shell execution, subprocess APIs, or agent tool dispatch.
  • Code review checks confirming authentication and authorization occur before chat processing and tool selection.
  • Inventory and policy enforcement for agent tools that can execute commands, access files, or reach external systems.
  • Dynamic testing that verifies unauthenticated requests are rejected and that tool invocation requires appropriate approval.
  • Runtime monitoring for unexpected requests to /chat and /chat/stream, unusual child processes, and access to credential-bearing environment variables.
  • Automated security review tools that flag missing route protection and unrestricted command-execution paths.

Organizations can look for this class of issue through:

  • Static analysis rules identifying unauthenticated routes connected to shell execution, subprocess APIs, or agent tool dispatch.
  • Code review checks confirming authentication and authorization occur before chat processing and tool selection.
  • Inventory and policy enforcement for agent tools that can execute commands, access files, or reach external systems.
  • Dynamic testing that verifies unauthenticated requests are rejected and that tool invocation requires appropriate approval.
  • Runtime monitoring for unexpected requests to /chat and /chat/stream, unusual child processes, and access to credential-bearing environment variables.
  • Automated security review tools that flag missing route protection and unrestricted command-execution paths.

Sources

SourceLink
github.comgithub.com/cas-bigdatalab/piflow/blob/ad8d0108a54a4257307d4946dc9250e26f24c63f/agents/tools.py#L114
github.comgithub.com/cas-bigdatalab/piflow/blob/ad8d0108a54a4257307d4946dc9250e26f24c63f/server.py#L615
lasso.securitylasso.security/vulnerability-database/cve-2026-109442
vulncheck.comvulncheck.com/advisories/piflow-2.0.0-through-2.0.1-unauthenticated-rce-via-chat-agent-exec-shell

Frequently asked

questions

Yes. If either chat endpoint is reachable over a network without an effective authentication boundary, an attacker may submit requests remotely.

No credentials are required at the vulnerable endpoints as described. Network reachability and the ability of the agent to invoke its shell tool are the key conditions.

Enforce authentication and authorization before request handling, disable unrestricted shell execution, and require constrained tools with explicit approval for sensitive actions.

Apply default-deny access controls, review every agent tool as a privileged capability, run services with least privilege, and continuously test endpoint protection and tool-use policies.

Yes. If either chat endpoint is reachable over a network without an effective authentication boundary, an attacker may submit requests remotely.

No credentials are required at the vulnerable endpoints as described. Network reachability and the ability of the agent to invoke its shell tool are the key conditions.

Enforce authentication and authorization before request handling, disable unrestricted shell execution, and require constrained tools with explicit approval for sensitive actions.

Apply default-deny access controls, review every agent tool as a privileged capability, run services with least privilege, and continuously test endpoint protection and tool-use policies.

Find out what's already
exploitable in your codebase.