| Название | letta-ai lettabot v0.2.0-alpha.13 Missing Authentication for Critical Function (CWE-306) |
|---|
| Описание | # Technical Details
A Missing Authentication vulnerability exists in the `src/api/server.ts` HTTP API of lettabot. The management read endpoints `GET /api/v1/pairing/:channel`, `GET /api/v1/status`, and `GET /api/v1/conversations` gate authentication with the condition `if (getPortalMode(options) !== 'shared' && !validateApiKey(req.headers, options.apiKey))`. When the effective portal mode is `shared` (which is the default conversation mode), the left side of the `&&` evaluates to `false`, causing `validateApiKey()` to never be called — the request is treated as authorized. This allows unauthenticated attackers to retrieve pending pairing request data, agent identifiers, conversation identifiers, channel mappings, and service metadata.
# Vulnerable Code
File: src/api/server.ts (lines 449-456)
Method: createApiServer() → GET /api/v1/pairing/:channel
Why: Skips validateApiKey() whenever getPortalMode() resolves to `shared`.
File: src/api/server.ts (lines 707-714)
Method: createApiServer() → GET /api/v1/status
Why: Same mode-gated authorization check exposes agent status metadata without API key.
File: src/api/server.ts (lines 928-934)
Method: getPortalMode()
Why: Returns `shared` when all agents use shared conversations, making the insecure branch reachable under default deployment settings.
# Reproduction
1. Deploy lettabot with default `shared` conversation mode.
2. Send unauthenticated GET requests to `/api/v1/pairing/telegram` and `/api/v1/status`.
3. Observe both return `200 OK` with pending pairing codes and agent metadata.
4. Switch to `per-channel` mode and confirm the same requests return `401 Unauthorized`.
5. Confirm the canary pairing code appears in the unauthenticated response.
# Impact
- Authentication bypass on management-plane read functionality.
- Unauthenticated enumeration of pending pairing requests and pairing codes.
- Disclosure of agent identifiers, conversation identifiers, configured channel mappings, service base URLs, and operational timestamps.
- Remote management data disclosure when API binds to `x.x.x.x` in cloud deployments. |
|---|
| Источник | ⚠️ https://gist.github.com/YLChen-007/70d0d217b0747c1e7e2b403b440aa6e9 |
|---|
| Пользователь | ChenMarry (UID 99089) |
|---|
| Представление | 18.06.2026 09:35 (2 месяцы назад) |
|---|
| Модерация | 05.08.2026 21:22 (2 months later) |
|---|
| Статус | Дубликат |
|---|
| Запись VulDB | 386359 [letta-ai LettaBot 0.2.0 API Status Route src/api/server.ts слабая аутентификация] |
|---|
| Баллы | 0 |
|---|