May 4, 2026·5 min read·41 visits
OpenClaw versions before 2026.4.2 fail to validate the senders of historical Slack thread messages, allowing unauthorized users to execute prompt injection attacks by participating in threads triggered by allowlisted users.
An origin validation vulnerability (CWE-346) exists within the OpenClaw AI assistant's Slack integration prior to version 2026.4.2. The platform fails to independently verify the sender of historical thread messages against configured allowlists, enabling unauthorized users to inject malicious instructions into the LLM context when an authorized user triggers the agent. This flaw facilitates prompt injection and context poisoning attacks.
OpenClaw is an AI assistant platform that integrates with corporate chat environments like Slack. Prior to version 2026.4.2, the platform's Slack integration suffers from a CWE-346 Origin Validation Error. The vulnerability allows unauthorized actors to inject content into the agent's LLM context window.
The flaw resides specifically within the resolveSlackThreadContextData function located in extensions/slack/src/monitor/message-handler/prepare-thread-context.ts. This function is responsible for reconstructing the conversational history of a Slack thread when the OpenClaw agent is invoked. The system validates the sender of the triggering message but fails to validate the senders of historical messages retrieved from the Slack API.
Successful exploitation results in arbitrary prompt injection. Unauthorized users can manipulate the agent's behavior, extract sensitive information intended for authorized users, or alter the assistant's persona. The vendor addressed the issue in release 2026.4.2 by implementing per-message sender validation.
The OpenClaw Slack integration relies on an allowFromLower list to restrict agent access to authorized users. When an authorized user interacts with the agent within a Slack thread, the agent queries the conversations.replies API endpoint to fetch the preceding messages. The design intent is to provide the Large Language Model with continuous conversational context.
The implementation processes the array of historical messages sequentially and concatenates them into the LLM prompt. The vulnerability occurs because the origin validation logic is exclusively applied to the current triggering event. The software implicitly assumes that if the invoking user is authorized, all historical content within the invoked thread is inherently safe for ingestion.
This constitutes a critical breakdown in trust boundary enforcement. In a shared channel, any workspace user can append messages to an ongoing thread. By failing to iterate over the retrieved historical messages and verify their individual senders against the access control list, the system processes untrusted input data as privileged context.
The vulnerable implementation lacked a filtering loop during history reconstruction. The application iterated through the threadHistory object and appended text segments without evaluating the identity of the message author.
// Vulnerable Implementation
const threadHistory = await fetchHistory(threadTs);
for (const historyMsg of threadHistory) {
historyParts.push(`${historyMsg.user}: ${historyMsg.text}`);
}Commit ac5bc4fb37becc64a2ec314864cca1565e921f2d addresses the flaw by introducing an explicit filtering mechanism before context construction. The patch implements a validation check against the isSlackThreadContextSenderAllowed function for every individual message retrieved from the Slack API.
// Patched Implementation
const allowedThreadHistory = threadHistory.filter((historyMsg) => {
return isSlackThreadContextSenderAllowed({
allowFromLower: params.allowFromLower,
userId: historyMsg.userId,
botId: historyMsg.botId,
});
});The fix comprehensively mitigates the specific attack vector by ensuring only authenticated inputs enter the prompt structure. The developers also introduced diagnostic logging to record instances where messages are explicitly omitted due to failed validation, providing visibility into potential injection attempts.
Exploitation requires the attacker to possess access to a Slack workspace where the OpenClaw integration is deployed. The attacker does not need to exist on the allowFromLower list. The vulnerability requires user interaction (UI:R), as an authorized user must invoke the agent within a poisoned thread.
The attacker initiates the exploit by injecting a prompt payload into an existing Slack thread or creating a new thread starter. The payload contains specific instructions directed at the underlying LLM. Subsequently, an authorized user replies to the thread and mentions the OpenClaw agent. The agent fetches the thread history, ingests the attacker's payload, and executes the unauthorized instructions.
The following sequence diagram illustrates the execution flow of a successful context poisoning attack against the vulnerable integration.
The primary impact is unauthorized manipulation of the AI agent's execution context. Depending on the configured capabilities of the OpenClaw agent, an attacker can extract sensitive conversational data, manipulate decision-making processes, or leverage the agent's privileges to perform unintended actions on behalf of the authorized user.
The CVSS v3.1 score of 5.4 reflects the medium severity of the vulnerability. The attack vector is Network (AV:N), but the complexity is offset by the requirement for User Interaction (UI:R) from an authorized entity. The impact metrics (C:L/I:L/A:N) indicate localized exposure of confidential data and modification of system state without causing a denial of service.
The EPSS score of 0.00016 indicates a low probability of imminent widespread exploitation in the wild. However, the availability of technical reproduction steps and the conceptual simplicity of the attack make targeted exploitation highly feasible against misconfigured corporate workspaces.
The vendor provides a direct remediation via software update. Administrators must upgrade OpenClaw deployments to version 2026.4.2 or later. The patch modifies the context preparation logic to strictly enforce the sender allowlist across the entire Slack thread history.
Administrators should conduct a thorough review of the Slack integration configuration. The allowFrom list must be strictly maintained to ensure only authorized personnel have access. Additionally, administrators should disable the allowNameMatching feature to prevent actors from spoofing the display names of authorized users to bypass access controls.
Security teams can implement detection mechanisms by monitoring application logs. The patched version emits specific log entries, such as slack: omitted non-allowlisted thread starter from context, when the filtering logic drops an unauthorized message. Correlating these logs with Slack audit trails facilitates the identification of active injection attempts.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
OpenClaw OpenClaw | < 2026.4.2 | 2026.4.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-346 |
| Attack Vector | Network |
| CVSS v3.1 | 5.4 |
| EPSS Score | 0.00016 |
| Exploit Status | PoC |
| Affected Component | prepare-thread-context.ts |
The software does not properly verify that the source of data or communication is valid.
The @jhb.software/payload-cloudinary-plugin exposes an endpoint that performs unvalidated cryptographic signing of Cloudinary API parameters, allowing authenticated users with minimal privileges to forge valid signatures for arbitrary actions. This flaw allows attackers to overwrite remote storage assets, execute unauthorized file uploads, alter asset visibility parameters, trigger SSRF webhooks, and perform directory traversal within Cloudinary repositories.
A Server-Side Request Forgery (SSRF) and Bearer Token Exfiltration vulnerability exists in the @merill/lokka (Lokka) Model Context Protocol (MCP) server prior to version 2.1.2. The server constructed Azure Resource Manager request URLs by concatenating user-controlled path parameters directly into destination request strings. By injecting authority-redefinition characters, an attacker can manipulate URL parsing to execute a host-escape attack, forcing the server to send high-privilege Azure Resource Manager (ARM) Bearer tokens to an external attacker-controlled host. This allows complete administrative access to the associated Azure subscriptions.
A directory traversal and symlink following vulnerability exists in Pydantic Settings when using the NestedSecretsSettingsSource with nested subdirectory lookups enabled. An attacker capable of writing to the secrets directory can bypass size limitations, read arbitrary host files, or cause a denial-of-service condition via cyclic symlinks.
A Server-Side Request Forgery (SSRF) vulnerability exists in SurrealDB's Identity & Access Management (IAM) module prior to version 3.1.5. When configuring JSON Web Key Set (JWKS) URLs for token verification, the remote fetcher follows HTTP redirects by default without validating redirect targets against configured network capabilities. This allows high-privileged users to bypass network access limits and perform blind port scanning of internal network resources.
A local file disclosure vulnerability exists in SurrealDB's full-text search capabilities, allowing authenticated users with database EDITOR or OWNER roles to read arbitrary files from the host system filesystem. This occurs by abusing the mapper() filter inside a DEFINE ANALYZER statement to point to system files.
SurrealDB versions 3.0.0 through 3.1.4 contain an information exposure vulnerability (CWE-203) where the query planner optimizes sorted queries using indexes on fields with field-level SELECT restrictions. Because the query planner performs index-based sorting before enforcing permission-based redaction, unauthorized users can observe the physical order of returned rows to deduce the relative values of protected fields.