Skip to content

[bug] Sign-in has no per-name attempt limit, and each IPv6 address gets its own budget #2901

Closed

Description

@Quick104

What happened

Password sign-in has no limit per account name, and every IPv6 address gets its own sign-in budget.

The login rate-limit budget (20 per minute, burst 10) and the general per-address budget count per client address. An IPv6 client is counted per full /128 address, so a single connection that holds a /64 (a typical home line or VPS) gets a fresh budget for every address it uses. Nothing counts failed attempts against the name being signed in to, so guesses at one account's password are bounded only by the server-wide budget (1000 requests per second by default) and bcrypt CPU. For accounts that sign in through LDAP, the same guesses reach the directory and can trip its lockout policy.

On a Silo dev deployment running current main, 70 failed sign-ins for one existing account name, each from a different address in one IPv6 /64 (50 through POST /api/v2/auth/login, 20 through Jellyfin AuthenticateByName), all answered 401. None answered 429. The correct password signed in immediately afterwards. As a control, the same attempts from a single address answered 429 after the 10th.

The Audiobookshelf listener (beta, opt-in) keeps its own in-memory per-address login limiter, which is not shared between API servers and has the same per-address blind spot.

Steps to reproduce

  1. On a deployment running current main, pick an existing account name.
  2. Send failed password sign-ins for that name from many addresses inside one IPv6 /64, through v1/v2 login and Jellyfin AuthenticateByName. Where the deployment can't receive real IPv6, a trusted reverse proxy that sets X-Forwarded-For gives the same per-address keys.
  3. Watch the response codes: every attempt answers 401 and none answers 429.
  4. Sign in to that account with its real password. It succeeds.

Expected behavior

Repeated failed sign-ins for one name should be limited no matter which addresses they come from, on every sign-in surface (v1, v2, Jellyfin, Audiobookshelf, LDAP-backed names), and across every API server sharing Redis. Unknown names should be limited the same way, so the limit doesn't reveal which names exist. The limit should be temporary (429 with Retry-After), so nobody can lock an account out for good. IPv6 clients should be counted per /64, as an IPv4 household is counted per address.

Silo version / commit

main at d004620

Deployment

Local dev build

Area

Accounts, profiles, and sign-in

Clients affected

  • Web UI
  • Android
  • iOS/tvOS/macOS
  • Jellyfin-compat client (Infuse, Findroid, ...)
  • Other/not client-specific

Relevant logs

No relevant server log lines; failed sign-ins and rate-limit decisions are not logged at the default level. The observation is the response codes above.

Technical notes

  • The request limiter keys sign-in budgets on the resolved client address string: ip:<addr>, authip:<addr>:login and authpeer:<peer>:login in internal/ratelimit/middleware.go. internal/clientip returns the full address, so nothing groups IPv6 by prefix.
  • All password sign-ins reach auth.Service.LoginWithProvider (v1 and v2) or auth.Service.CompatLoginWithLocalFallback (Jellyfin and Audiobookshelf), which never count attempts per name.
  • ratelimit.AttemptLimiter already shares attempt counts through Redis for profile PINs and Quick Connect codes and fits a per-name sign-in budget.
  • The per-peer cap from fix(ratelimit): stop forwarded clients from dodging sign-in rate limits #2364 bounds clients rotating X-Forwarded-For through one proxy, but not a client that connects directly from many IPv6 addresses.

Source: internal code audit.

AI harness

Claude Code

AI tool(s)

Claude Code (bash, file read and search), GitHub CLI

AI model(s)

claude-opus-5-5

AI involvement

Fully AI-generated, human verified

Independent or adversarial review

n/a

Confirmations

  • I searched open and recently closed issues and pull requests, and this is not already reported
  • I reproduced this myself on a real deployment
  • Any logs provided are raw apart from marked redactions and are not AI-summarized; if none were available, I said so above

Activity

  1. added
    bug
    on Oct 22, 2026
  2. self-assigned this
    on Oct 22, 2026
  3. Quick104 commented on Oct 22, 2026

    @Quick104
    ContributorAuthor

    🤖 AI agent claim. Claude Code (claude-opus-5-5) is working on a fix for this issue on behalf of @Quick104, who is assigned.

    A pull request will link here when the fix is ready. If the work stops without a fix, the assignment and this comment are removed.

    Planning to work on this, or have context to add? Reply here and mention @Quick104.

  4. added
    impact: security
    priority: P0
    on Oct 22, 2026
  5. added a commit that references this issue on Oct 22, 2026
    be6527e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugimpact: securitypriority: P0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions