vulnerableVerifiedAGT-2026-0228
Network-AI: ApprovalInbox HTTP server has no authentication — anyone can approve pending agent actions
A real bug in otherwise honest software. Check your version against the affected range below.
GHSA-mxjx-28vx-xjjj · CVE-2026-58482
Summary
`network-ai`'s `ApprovalInbox` (`lib/approval-inbox.ts`) is a shipped, exported, documented feature — *"a web-accessible approval queue with REST API … and SSE streaming"* (SECURITY.md). It is the network surface of the **human-in-the-loop Approval Gate**, which `ApprovalGate` uses to require explicit human approval for *"high-risk operations (writes, shell commands, budget spend)"* (SECURITY.md). The HTTP server it exposes has **no authentication of any kind** and sets **`Access-Control-Allow-Origin: *`** on every route, including the state-changing `POST /approvals/:id/approve` and `/deny`.
As a result, any party who can send an HTTP request to the inbox port — a co-located process, a container/SSRF on the same host, a remote client when the operator binds a non-loopback address, **or any website the operator visits in a browser (via the wildcard CORS)** — can **enumerate pending approvals and approve them**, defeating the entire human-in-the-loop control and causing the gated high-risk action (e.g. a shell command the agent was holding for review) to execute without consent.
This is the same vulnerability class the maintainer has already fixed twice on the MCP server (GHSA-fj4g-2p96-q6m3 missing auth; GHSA-j3vx-cx2r-pvg8 empty default secret) — the auxiliary `ApprovalInbox` server never received that hardening.
- **Affected:** `network-ai <= 5.11.0` (current latest), `lib/approval-inbox.ts` — `httpHandler()` / `routeRequest()` / `startServer()`. `ApprovalInbox` is public API (exported from `index.ts:1126`). - **CWE:** [CWE-862](https://cwe.mitre.org/data/definitions/862.html) (Missing Authorization) + [CWE-352](https://cwe.mitre.org/data/definitions/352.html) (Cross-Site Request Forgery, via wildcard CORS). - **CVSS v3.1 (proposed):** - Drive-by CSRF against the default `127.0.0.1` deployment: `AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:N` = **5.9 Medium**. - Direct request when the operator binds a non-loopback address (or local/SSRF reach): `AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N` = **8.1 High**.
Details
No authentication on the request pipeline (`lib/approval-inbox.ts`)
`httpHandler()` sets a wildcard CORS policy and routes every request straight to `routeRequest()` with **no auth check**:
```js // lib/approval-inbox.ts:250-275 httpHandler() { return (req, res) => { ... res.setHeader('Access-Control-Allow-Origin', '*'); // 256 <-- wildcard CORS res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS'); res.setHeader('Access-Control-Allow-Headers', 'Content-Type'); if (req.method === 'OPTIONS') { res.writeHead(204); res.end(); return; } // preflight OK for any origin ... this.routeRequest(req, res, subPath, url); // 273 <-- no token / secret / origin gate }; } ```
`routeRequest()` exposes list + approve/deny with no credential check (default `pathPrefix` = `/approvals`):
```js // lib/approval-inbox.ts:369-405 routeRequest(req, res, subPath, url) { if (subPath === '/' && req.method === 'GET') { // GET /approvals/ -> enumerate pending ids this.sendJson(res, 200, this.list(status)); return; } ... const approveMatch = subPath.match(/^\/([a-f0-9]+)\/approve$/); // POST /approvals/:id/approve if (approveMatch && req.method === 'POST') { this.readBody(req).then((body) => { const approvedBy = typeof body.approvedBy === 'string' ? body.approvedBy : 'anonymous'; // defaults to 'anonymous' const entry = this.approve(approveMatch[1], approvedBy, reason); // resolves the gate -> action proceeds ... }); } } ```
`approve()` resolves the pending promise that `ApprovalGate` is awaiting, so the gated action proceeds:
```js // lib/approval-inbox.ts:172-183 / 327-339 approve(id, approvedBy, reason) { ... return this.resolve(id, 'approved', { approved: true, approvedBy, reason }); // promise -> {approved:true} } ```
`startServer()` binds the handler (default `127.0.0.1`, bu
Imported from OSV GHSA-mxjx-28vx-xjjj.
Affected
- npm:network-ai
- >= 5.0.0, < 5.12.2 (fixed in 5.12.2)
Field marks
- Kind
- package
- Reported by
- osv-import
Sources
- osv.dev https://osv.dev/vulnerability/GHSA-mxjx-28vx-xjjj
- github.com https://github.com/Jovancoding/Network-AI/security/advisories/GHSA-m…
- github.com https://github.com/Jovancoding/Network-AI/commit/a59c13a1f0ce0e8a077…
- github.com https://github.com/Jovancoding/Network-AI
- github.com https://github.com/Jovancoding/Network-AI/releases/tag/v5.12.2
Wrong or outdated? Open an issue or PR against corpus/entries/AGT-2026-0228.json.