Skip to content

πŸ› Server auth bypass β€” token validation not enforcedΒ #499

Closed

Description

@ajianaz

Issue 1: Server Auth Bypass

Problem

When UTEKE_AUTH_TOKEN is set, uteke-serve accepts all requests regardless of whether they carry a valid token, wrong token, or no token at all.

Reproduction

UTEKE_AUTH_TOKEN=admin-secret uteke-serve --port 9878

# No token - should be 401/403, but returns 200
curl -s http://127.0.0.1:9878/health

# Wrong token - should be 401/403, but returns 200  
curl -s -H "Authorization: Bearer wrong-token" http://127.0.0.1:9878/health

# Correct token - 200 expected
curl -s -H "Authorization: Bearer admin-secret" http://127.0.0.1:9878/health

Impact

  • Server mode is not secure for exposed ports
  • UTEKE_READ_ONLY_TOKEN is also ineffective
  • Auth tokens provide false sense of security

Expected

  • Requests without token should return 401/403
  • Requests with wrong token should return 401/403
  • Requests with valid admin token should return 200 (full access)
  • Requests with valid read-only token should return GET 200, POST/DELETE 403

Severity

Critical β€” security vulnerability.

Activity

  1. added
    bug
    scope:core
    on Jun 30, 2026
  2. ajianaz commented on Jun 30, 2026

    @ajianaz
    CollaboratorAuthor

    Update: Auth is working correctly

    Re-tested with proper endpoints (not just /health which is exempt by design for load balancers):

    Test Expected Actual Status
    GET /health no token 200 (exempt) 200 βœ…
    GET /stats no token 401 401 βœ…
    POST /remember no token 401 401 βœ…
    POST /remember wrong token 401 401 βœ…
    POST /remember correct token 200 200 βœ…

    Verdict: Original report was a false positive β€” only tested /health which is intentionally exempt. Auth enforcement works correctly on all other endpoints.

    Remaining action: Document that GET /health skips auth (already in source comments). Closing this issue.

  3. ajianaz commented on Jun 30, 2026

    @ajianaz
    CollaboratorAuthor

    False positive β€” auth works correctly. /health is intentionally exempt for load balancers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugscope:core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions