| Title | https://github.com/davila7/ claude-code-templates 1.28.3 Improper Access Control |
|---|
| Description | Unauthenticated CORS + all-interfaces bind on claude-api-proxy.js allows remote session enumeration and prompt injection into active Claude Code sessions
Description
## Summary
`cli-tool/src/claude-api-proxy.js` runs an Express server (default port 3335)
with wildcard CORS (`Access-Control-Allow-Origin: *`) and no host argument to
`app.listen()` (binds all network interfaces), exposing three completely
unauthenticated endpoints:
- `GET /api/sessions` - lists every active Claude Code session on the
machine, including each session's `sessionId`, `projectPath`, file path,
and last message content.
- `POST /api/send-message` - given only a `sessionId` (no other auth),
appends an attacker-supplied string into that session's JSONL conversation
transcript as a `type: "user"` message, then attempts to wake the Claude
Code process (SIGUSR1 signal / AppleScript automation on macOS) so it
notices the new "user" input.
- `GET /api/conversation/:sessionId` - reads back a session's full
conversation history given only its id.
This is the same overall exposure shape (wildcard CORS + no-host bind +
zero auth on a locally-installed developer tool) as the already-fixed
`sandbox-server.js` RCE (GHSA-79wm-x847-7cvg / CVE-2026-73222), just in a
different file that was not covered by that fix. This module is
instantiated by `src/analytics.js`, which is started as part of the
project's analytics/dashboard flow.
## Impact
Because CORS is wildcard and the server listens on all interfaces:
1. Any web page a developer visits while this server is running can read
`GET /api/sessions` from the browser to enumerate every active Claude
Code session on their machine (this endpoint's simple GET with no custom
headers does not even trigger a CORS preflight, so the wildcard origin
is sufficient on its own).
2. That same page can then `POST /api/send-message` with a discovered
`sessionId` and an attacker-chosen message. The message is appended to
the session's conversation transcript as if the developer had typed it
themselves (`type: "user"`, `userType: "external"`), and the server then
actively tries to wake the Claude Code process so it picks up the new
input.
3. Since Claude Code is an agentic coding tool capable of running shell
commands and editing files with the developer's own permissions, a
forged "user" message that is later treated as legitimate input is a
remote, unauthenticated prompt-injection vector into an active agentic
session, not just a data-integrity bug. Any device on the same network
as the developer's machine (not just a malicious webpage) can also reach
it directly, since the server is not bound to loopback.
## Affected versions
Confirmed on `main` HEAD as of 2026-09-04, in `cli-tool/src/claude-api-proxy.js`.
## Proof of Concept
(available upon request)
## Suggested fix
Restrict CORS to an explicit allow-list of the local dashboard origin
(`http://localhost:<port>` / `http://127.0.0.1:<port>`), rejecting any other
`Origin` with 403, and bind the server to `127.0.0.1` instead of all
interfaces, mirroring the fix already applied to `sandbox-server.js` in
commit bc4618b.
|
|---|
| Source | ⚠️ https://github.com/davila7/claude-code-templates/issues/1139 |
|---|
| User | carfeii (UID 97470) |
|---|
| Submission | 11/09/2026 14:37 (21 days ago) |
|---|
| Moderation | 11/30/2026 17:03 (21 days later) |
|---|
| Status | Accepted |
|---|
| VulDB entry | 445870 [davila7 claude-code-templates up to 1.29.6 Claude API proxy claude-api-proxy.js missing authentication] |
|---|
| Points | 20 |
|---|