/

CVE-2026-33935

Severity:

HIGH RISK

(7.5)

Improper Brute-Force Protection in MyTube

CVE-2026-33935

Analyzed

Vulnerability type

Category:

Improper Brute-Force Protection

CWE:

CWE-307

Impact:

Authentication Lockout / Application-Level Denial of Service

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

MyTube's authentication lockout mechanism uses a single, globally shared failed-attempt counter and cooldown timer for all password verification endpoints.

An unauthenticated attacker can repeatedly trigger failed logins to force progressively longer lockouts—up to 24 hours—and then sustain this state indefinitely, preventing legitimate administrators and visitors from signing in.

Affected context

This vulnerability arises in MyTube deployments that rely on built-in password-based authentication and expose the three password verification endpoints over the network without additional access controls.

All endpoints share a single, file-backed login state (login-attempts.json) that tracks failed attempts and cooldowns globally instead of per-account or per-source.

In such configurations, any user—authenticated or not—can influence the lockout behavior affecting all other accounts.

Exploit preconditions

  • Attack surface: Publicly exposed password verification endpoints used by administrators and visitors.
  • Required access: No authentication is required; an attacker only needs network access to reach any of the login endpoints.
  • Trigger point: Repeated submission of invalid credentials to any password verification endpoint.
  • Why exploitation is possible: The failed attempt counter and cooldown logic are implemented as a single, shared state (login-attempts.json) across all endpoints and accounts. Because the lockout decision uses this global state without scoping to user, IP, or session, an attacker can drive the counter up and extend cooldowns for all users.

Why this happens

The core issue is an overbroad and stateful brute-force protection mechanism that does not distinguish between different users or sources of login traffic.

All three password verification endpoints call recordFailedAttempt() on unsuccessful authentication, which increments a shared failedAttempts counter and updates cooldown timestamps in login-attempts.json.

Before checking any password, each endpoint calls canAttemptLogin(), which reads the same shared file to decide whether a cooldown is active.

This design maps to CWE-307: Improper Restriction of Excessive Authentication Attempts, because lockout controls are applied globally rather than in a scoped manner, allowing arbitrary clients to trigger lockouts that affect unrelated users, turning protection into a denial-of-service vector.

Potential impact

  • Legitimate administrators may be unable to access the management interface for extended periods.
  • All visitor accounts may be locked out of password-based login, disrupting normal usage.
  • Attackers can maintain an effective, application-level denial of service by periodically triggering new lockouts.
  • Operational tasks dependent on authenticated access (e.g., configuration changes, updates, or content management) can be delayed or blocked.
  • Increased support burden as users encounter unexplained login failures or prolonged cooldown messages.

General mitigation guidance

Mitigation typically focuses on scoping and hardening authentication throttling and lockout controls so they cannot be abused globally.

Defensive patterns include:

  • Implementing rate limiting and lockout policies on a per-account, per-credential, or per-source (IP/device) basis rather than using a single global counter.
  • Designing lockout mechanisms to degrade gracefully, for example by using progressive delays or stepped CAPTCHAs instead of hard global lockouts that affect all users.
  • Keeping brute-force protections stateless or soft-state where possible, or partitioning stored state so that one user's failures do not impact others.
  • Applying layered controls such as application-level rate limiting, reverse proxy limitations, and WAF rules to constrain high-volume authentication traffic.
  • Logging and monitoring authentication failures with anomaly detection to flag unusual patterns indicative of lockout abuse.

How teams detect issues like this

Detection can focus on both code-level patterns and runtime behavior:

  • Static/code analysis:
  • Identify authentication logic that uses shared global or file-backed state (e.g., login-attempts.json) for tracking failed attempts without keys for user, IP, or session.
  • Flag authentication systems where cooldown or lockout decisions are made without referencing a specific account identifier.
  • Review for authentication endpoints exposed without additional rate limiting, CAPTCHA, or upstream throttling.
  • Code review signals:
  • Centralized counters or cooldown variables shared across login endpoints.
  • Lockout logic that is triggered on any failure rather than scoped to a principal.
  • Rejection paths that occur before credential verification based solely on global cooldown checks.
  • Operational/behavioral monitoring:
  • Sudden spikes in failed login attempts from one or a small set of sources.
  • Extended periods where the majority of login attempts are rejected due to "cooldown" or "too many attempts" messages.
  • Repeated patterns of a lockout expiring followed immediately by a new lockout.

Automated SAST and security review tools can be configured to search for shared lockout state or unscoped brute-force mitigation logic in authentication components.

Sources

SourceLink
github.comgithub.com/franklioxygen/MyTube/blob/941035909ee3f96a6f80f38acf70cbc3e66b5098/backend/src/services/loginAttemptService.ts#L13
github.comgithub.com/franklioxygen/MyTube/commit/4d89b146b16d08f27d8fd3e0a9122b109335deb1
github.comgithub.com/franklioxygen/MyTube/commit/752bc7f0ac83df8c881e6b6d5dd6f36bb274ee58
github.comgithub.com/franklioxygen/MyTube/commit/dd7b4a611fcc5b25a569f379be9a503eb413b6aa
github.comgithub.com/franklioxygen/MyTube/security/advisories/GHSA-6w95-qgc4-5jxf

Frequently asked

questions

Yes. Any remote attacker who can reach the exposed password verification endpoints can exploit the vulnerability without prior authentication by sending repeated invalid login requests.

The attacker only needs network access to the MyTube instance's public authentication endpoints. No valid account, credentials, or administrative privileges are required.

The most robust fix is to redesign brute-force protection so that failed-attempt counters and cooldown timers are scoped to individual identities or sources (e.g., per-account, per-IP, or per-session), and to avoid any globally shared lockout state that can impact unrelated users. Additional measures like upstream rate limiting and CAPTCHAs can further reduce abuse potential.

When designing authentication controls, treat rate limiting and lockouts as per-entity protections rather than global switches. During design and review, explicitly ask whether one user's behavior can impact others, and enforce architectural patterns—such as partitioned counters, layered throttling, and anomaly-based detection—that prevent a single unauthenticated actor from denying service to the entire user base.

Find out what's already
exploitable in your codebase.