OpenClaw Regex Injection and ReDoS Vulnerability via Unescaped Feishu Mention Metadata
Vulnerability
A vulnerability in OpenClaw versions prior to 2026.2.19 allows for regex injection and denial-of-service conditions through unescaped Feishu mention metadata. The issue arises in the 'stripBotMention' function, where RegExp objects are constructed directly from mention data without proper escaping. This oversight enables attackers to craft nested-quantifier patterns or metacharacters that can trigger catastrophic backtracking, disrupt message processing, or inadvertently remove content before it is processed by the model.
Impact
Exploitation of this vulnerability could lead to regular expression injection, allowing crafted mention metadata to manipulate message content processing, and a ReDoS condition, where nested-quantifier patterns cause excessive backtracking in regex evaluation, potentially leading to performance degradation or application unresponsiveness.
Reproduction
To reproduce this vulnerability, send a message in a Feishu group or direct chat that includes a mention of the bot. Craft the mention to include regex metacharacters or patterns that exploit the 'stripBotMention' function's regex handling. This can be done by, for example, using a mention name that includes regex metacharacters, such as a period or asterisk, which could be interpreted as 'any character' or 'zero or more characters' in regex syntax. Once the message is sent, the bot's response can be observed to see if the injected regex metacharacters were processed as intended, indicating successful exploitation.
Remediation
Users can update to OpenClaw version 2026.2.19 or later, where this vulnerability has been patched.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
