/

CVE-2026-59704

Severity:

HIGH RISK

(7.1)

Missing Authorization (CWE-862) in Cap AI Video API

CVE-2026-59704

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Data Access and Resource Consumption

Severity:

HIGH RISK

(7.1)

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

Cap's /api/video/ai endpoint returns private AI metadata for arbitrary video IDs without verifying that the caller owns or can access the referenced video.

Under normal authenticated use this endpoint should only expose AI content for videos the user is permitted to manage, but an attacker can abuse it to read sensitive metadata and consume another user's AI credits.

Affected context

This vulnerability occurs in Cap's backend where the GET /api/video/ai endpoint exposes AI-generated metadata for videos.

The issue manifests when the system relies solely on authentication (a valid session or token) and does not enforce per-video authorization checks such as ownership or membership verification.

It is most relevant in deployments where multiple users share a common API surface and where AI credit usage is tied to individual video owners.

Exploit preconditions

  • Attack surface: HTTP API endpoint GET /api/video/ai exposed to authenticated users
  • Required access: Any valid user account or API token; no special privileges required
  • Trigger point: Supplying arbitrary or enumerated video IDs as request parameters to the AI metadata endpoint
  • Why exploitation is possible: The backend trusts the caller's authentication status and does not verify that the caller is authorized to access the requested video or spend the owner's AI credits

Why this happens

The underlying bug is a missing authorization check on a resource-specific API, mapping directly to CWE-862: Missing Authorization.

The endpoint correctly requires authentication but fails to enforce resource-level access control, such as confirming that the requesting principal owns the video or belongs to an allowed group.

This insecure pattern treats a user's authenticated identity as sufficient for all operations, rather than applying fine-grained authorization policies per video and per credit-consuming action.

Potential impact

  • Attackers may read private AI-generated titles, summaries, and chapter metadata for videos they do not own.
  • Attackers can trigger unauthorized AI generation that consumes another user's credits.
  • Sensitive business or personal information embedded in AI summaries could be exposed.
  • Service providers may experience billing disputes or trust erosion due to unauthorized credit usage.
  • Lateral privacy violations can occur across tenant boundaries in multi-user or multi-tenant environments.

General mitigation guidance

Effective mitigation focuses on enforcing robust authorization at the resource level and aligning API behavior with least-privilege principles.

Common defensive patterns include:

  • Implementing ownership and membership checks for every video-related endpoint, ensuring that only authorized principals can access or modify a given video's AI data.
  • Centralizing authorization logic in a reusable access control layer, instead of relying on ad-hoc checks inside individual handlers.
  • Designing APIs so that identifiers are scoped (e.g., user- or tenant-scoped IDs) and cannot be freely enumerated across accounts.
  • Separating credit-spending operations from read-only metadata retrieval, and requiring explicit, authorized consent paths before AI processing consumes credits.
  • Logging authorization decisions and denied requests to support auditing and anomaly detection.

How teams detect issues like this

Detection typically involves a combination of design review, code analysis, and runtime monitoring:

  • Static analysis or manual review to ensure every protected resource access path includes explicit authorization checks tied to the requesting principal and resource.
  • Architectural review for APIs that accept raw resource IDs from clients, flagging endpoints that rely only on authentication without ownership or role validation.
  • Policy enforcement via API gateways or middleware that require declared authorization policies (e.g., role-based or attribute-based) for each route.
  • Runtime monitoring and logging to identify suspicious access patterns, such as a single user requesting AI metadata for many distinct video IDs they do not own.
  • Periodic security testing, including authorization-focused test cases, to validate that private metadata and credit usage cannot be triggered by unauthorized accounts.

Sources

SourceLink
github.comgithub.com/CapSoftware/Cap
github.comgithub.com/CapSoftware/Cap/commit/8d48642b6e7938af238386383ef1c273be4110dd
github.comgithub.com/CapSoftware/Cap/issues/1981
github.comgithub.com/CapSoftware/Cap/pull/1926
vulncheck.comvulncheck.com/advisories/cap-missing-access-control-in-video-ai-metadata-endpoint

Frequently asked

questions

Any user with a valid account or token can potentially exploit the issue, provided they can obtain or guess video IDs belonging to other users. The scope depends on how easily video identifiers can be discovered or enumerated.

The attacker only needs standard authenticated access; they do not require administrative privileges. Once logged in, they can call the vulnerable endpoint with arbitrary video IDs to retrieve metadata and trigger AI processing.

Introduce strict authorization checks for every request to the AI video endpoint, verifying that the caller is allowed to access the specific video and to consume credits on behalf of that video's owner. Centralizing these checks in an access control layer reduces the chance of future misses.

Establish a consistent access control model, require explicit authorization for all resource-level actions, and enforce these policies via shared middleware or services. Complement this with security-focused code review, automated tests for access control, and clear API contracts that distinguish authenticated from authorized operations.

Find out what's already
exploitable in your codebase.