/

CVE-2026-33735

Severity:

HIGH RISK

(8.8)

Authorization Bypass / Access Control in MyTube Database

CVE-2026-33735

Analyzed

Vulnerability type

Category:

Authorization Bypass / Access Control

CWE:

CWE-285, CWE-639

Impact:

Complete Application Compromise via Access Control Failure

Severity:

HIGH RISK

(8.8)

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 versions prior to 1.8.69 contain an authorization bypass in the /api/settings/import-database endpoint that allows low-privileged users to upload and replace the entire SQLite database.

When triggered, this flaw can lead to complete compromise of the application, including user accounts, configuration, and stored data; similar issues may affect other POST routes exposed by the API.

Affected context

This vulnerability affects MyTube deployments where:

  • The /api/settings/import-database endpoint (and similar POST routes) is exposed to authenticated users beyond administrators.
  • Authorization checks do not sufficiently distinguish between low-privileged and high-privileged roles for sensitive settings operations.
  • The application relies on a single SQLite database file as the core data store for configuration, user data, and access rules.

In such contexts, any user with valid but low-privilege credentials can potentially trigger a database import that replaces the application's primary datastore.

Exploit preconditions

  • Attack surface: HTTP(S) API endpoints, specifically /api/settings/import-database and other affected POST routes.
  • Required access: Valid low-privilege user credentials or any account allowed to reach these endpoints.
  • Trigger point: Sending a crafted POST request to the import-database endpoint (and possibly related POST routes) with a supplied SQLite database file.
  • Why exploitation is possible:
  • Sensitive administrative functionality is exposed without sufficient authorization enforcement.
  • The endpoint trusts that any authenticated caller is allowed to perform full database imports.
  • The application lacks fine-grained access control or proper role checks for high-impact operations.

Why this happens

The core issue is an access control failure where a sensitive administrative operation—importing and replacing the entire database—is not constrained to appropriately privileged roles.

This corresponds to CWE-285: Improper Authorization, where the system fails to enforce necessary authorization checks before granting access to protected functionality.

The mention of CWE-639: Authorization Bypass Through User-Controlled Key reflects how user-controllable request parameters and endpoints can be invoked without verifying the caller's effective permissions.

Abstractly, the pattern is:

  • High-impact operations are exposed over generic API endpoints.
  • The application treats "authenticated" as equivalent to "authorized" for operations that should be restricted to administrators.
  • There is no independent verification that the caller has sufficient privilege to alter or replace the core datastore.

Potential impact

  • Full replacement of the SQLite database with attacker-controlled content.
  • Creation, deletion, or modification of user accounts, including promotion to administrative roles.
  • Loss of integrity and availability of application data, including video metadata and configuration.
  • Persistent compromise of the application through implanted configuration or embedded malicious data in the database.
  • Potential exposure of sensitive information if the replacement database is crafted to weaken or bypass security controls.
  • Disruption of service, including denial of service if the database is corrupted or incompatible.

General mitigation guidance

Effective mitigation centers on strengthening access control boundaries and isolating high-risk operations:

  • Restrict sensitive endpoints (such as database import/export, backup/restore, and global settings) to clearly defined administrative roles.
  • Apply defense-in-depth authorization checks: combine role-based access control, explicit permission flags, and route-level restrictions.
  • Separate configuration and maintenance APIs from regular user APIs; consider binding administrative actions to a dedicated admin interface or network segment.
  • Apply the principle of least privilege so that non-administrative accounts cannot invoke system-wide operations, even indirectly.
  • Implement centralized authorization logic rather than ad-hoc checks scattered across handlers, reducing the chance of missed validations.
  • Log and monitor all use of high-impact endpoints, aiding quick detection of misuse.

How teams detect issues like this

Detection typically involves both code-centric analysis and runtime monitoring:

  • Static analysis / code review:
  • Identify endpoints that perform high-impact operations (database import/export, configuration changes, user role management).
  • Verify that each such endpoint enforces explicit authorization checks tied to admin or elevated roles.
  • Look for routes where "is authenticated" is the only gate for sensitive functionality.
  • Review route definitions and middleware wiring to ensure that expected authorization guards are actually attached.
  • Automated tooling:
  • Use API security scanners or SAST tools configured to flag missing or weak authorization checks on administrative routes.
  • Enforce policies that require explicit role checks in handlers touching core datastore operations.
  • Operational monitoring:
  • Log all POST requests to settings and maintenance endpoints, including the initiating user identity.
  • Set up alerts on unusual patterns, such as low-privilege accounts invoking administrative routes or spikes in database import activity.

Sources

SourceLink
github.comgithub.com/franklioxygen/MyTube/blob/6ade838a46366174e2c030f856340f3856e03132/backend/src/middleware/roleBasedSettingsMiddleware.ts#L116
github.comgithub.com/franklioxygen/MyTube/commit/b7bf9b7960958c6c51f85fe50a2fc041a086c466
github.comgithub.com/franklioxygen/MyTube/security/advisories/GHSA-63cf-662x-crp2

Frequently asked

questions

Exploitability depends on who can authenticate to the MyTube instance. Any attacker who can obtain low-privilege credentials and reach the affected endpoints could potentially replace the entire database, leading to a broad compromise of the application.

No. The vulnerability specifically allows attackers with low-privilege accounts—those that should not have administrative rights—to invoke the database import functionality due to insufficient authorization checks.

The safest pattern is to enforce strict, centralized authorization on all sensitive operations, ensuring that only explicitly designated administrative roles can access endpoints that modify global configuration, perform backups/restores, or manipulate the core datastore. Additionally, separate administrative APIs from regular user functionality and require robust authentication for all admin actions.

Adopt a security-by-design approach: define clear privilege levels, centralize authorization decisions, and ensure that every handler for high-impact operations performs explicit role checks. Complement this with consistent code review practices, automated tests that verify access control behavior, and security tooling that flags endpoints missing required authorization guards.

Find out what's already
exploitable in your codebase.