NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-22178: OpenClaw has ReDoS and regex injection via unescaped Feishu mention metadata in RegExp construction

mediumCVSS 4.0 6.9GHSA-c6hr-w26q-c636

OpenClaw's Feishu extension built a regular expression straight from mention metadata, so crafted mention names could freeze message processing with catastrophic backtracking or strip unintended text from messages before they reach the model. Releases 2026.2.6 through 2026.2.17 are affected; upgrade to 2026.2.19.

Published Mar 2, 2026 · Updated Mar 19, 2026 · Analysis Oct 31, 2026

What an attacker can do

In extensions/feishu/src/bot.ts, stripBotMention() calls new RegExp() with mention.name and mention.key from the incoming Feishu message. It does not escape regex metacharacters. Whoever controls those fields controls the pattern.

Two effects follow. A nested-quantifier pattern causes catastrophic backtracking (ReDoS) and blocks message processing in the Node.js process, since the regex engine runs on the main thread. Metacharacters can also make the pattern match more than the bot mention, which removes unintended content from the message before it goes to the model. That changes what the agent sees.

The attacker needs to be able to send a Feishu message that carries crafted mention metadata to a bot connected through this extension. The CVSS vector has no privileges and no user interaction, with low availability impact. No data disclosure or code execution is described.

Who is affected

The npm package openclaw from 2026.2.6 (first affected release) through 2026.2.17, which is everything below 2026.2.19 that includes the Feishu code. Only instances with the Feishu extension enabled are exposed.

npm ls -g openclaw
openclaw --version

openclaw

Ecosystem
npm
Affected
< 2026.2.19
Fixed in
2026.2.19
Check
npm ls openclaw

How to fix it

Upgrade to openclaw 2026.2.19.

npm install -g [email protected]

The fix commits 7e67ab75cc2f0e93569d12fecd1411c2961fcc8c and 74268489137510b6f6349919d1e197b17290d92c address the unescaped construction in stripBotMention(). The advisory names no workaround. If you cannot upgrade right away, disable the Feishu extension.

How to tell if you were hit

Look for the Feishu channel handler pinning a CPU core or messages stalling after an inbound Feishu message from an unfamiliar sender. Check recent Feishu mention names and keys in logs for regex metacharacters such as nested groups with + or *, for example (a+)+, brackets or parentheses. A prompt that arrives at the model with parts of the message missing also points to regex injection.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

extensions/feishu/src/bot.ts constructed new RegExp() directly from Feishu mention metadata (mention.name, mention.key) in stripBotMention() without escaping regex metacharacters.

Affected Packages / Versions

  • Package: npm openclaw
  • Affected versions: <= 2026.2.17
  • First affected release: 2026.2.6
  • Patched version: 2026.2.19

Impact

  • ReDoS: crafted nested-quantifier patterns in mention metadata can trigger catastrophic backtracking and block message processing.
  • Regex injection: metacharacters in mention metadata can remove unintended message content before it is sent to the model.

Fix Commit(s)

  • 7e67ab75cc2f0e93569d12fecd1411c2961fcc8c
  • 74268489137510b6f6349919d1e197b17290d92c

Thanks @allsmog for reporting.

Questions

Is OpenClaw 2026.2.17 affected by CVE-2026-22178?

Yes. The affected range runs from 2026.2.6 to 2026.2.17. Version 2026.2.19 contains the fix.

Does this need the Feishu extension?

Yes. The vulnerable code is in the Feishu extension's mention handling, so instances without it enabled are not reachable through this path.

Can it lead to code execution?

The advisory describes only ReDoS and regex injection that removes message content. It reports no code execution.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More OpenClaw vulnerabilities

All OpenClaw entries