/

CVE-2026-121729

Severity:

HIGH RISK

(8.3)

Missing Authorization (CWE-862) in emailflare API Keys

CVE-2026-121729

Received

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-862

Impact:

Unauthorized API key management, mail sending, and integration disruption

Severity:

HIGH RISK

(8.3)

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

emailflare's inbox service does not adequately authorize access to the /api/keys routes, allowing any authenticated member to list, create, or revoke API keys. A member could create a global live key for sending mail from any domain or revoke keys used by integrations.

emailflare's inbox service does not adequately authorize access to the /api/keys routes, allowing any authenticated member to list, create, or revoke API keys. A member could create a global live key for sending mail from any domain or revoke keys used by integrations.

Affected context

The issue affects emailflare's inbox service API key routes at /api/keys in code before commit cf31f33. It becomes risky when an authenticated member can reach these routes without authorization checks that restrict key operations to appropriately privileged users.

The issue affects emailflare's inbox service API key routes at /api/keys in code before commit cf31f33. It becomes risky when an authenticated member can reach these routes without authorization checks that restrict key operations to appropriately privileged users.

Exploit preconditions

  • Attack surface: The inbox service's /api/keys routes
  • Required access: An authenticated emailflare account; the description does not specify a required role beyond membership
  • Trigger point: Requests to list, create, or revoke API keys
  • Why exploitation is possible: The routes lack authorization checks that limit these operations to permitted users
  • Attack surface: The inbox service's /api/keys routes
  • Required access: An authenticated emailflare account; the description does not specify a required role beyond membership
  • Trigger point: Requests to list, create, or revoke API keys
  • Why exploitation is possible: The routes lack authorization checks that limit these operations to permitted users

Why this happens

The service permits authenticated members to perform sensitive API key operations without verifying that they are authorized to do so. This is a missing authorization control, mapping to CWE-862: Missing Authorization. Authentication establishes a user's identity, but the application does not adequately enforce permission checks for the requested actions.

The service permits authenticated members to perform sensitive API key operations without verifying that they are authorized to do so. This is a missing authorization control, mapping to CWE-862: Missing Authorization. Authentication establishes a user's identity, but the application does not adequately enforce permission checks for the requested actions.

Potential impact

  • An attacker could create a global live API key and use it to send mail from any domain
  • An attacker could revoke existing keys, potentially disrupting integrations
  • Unauthorized key access could weaken the security of connected services
  • An attacker could create a global live API key and use it to send mail from any domain
  • An attacker could revoke existing keys, potentially disrupting integrations
  • Unauthorized key access could weaken the security of connected services

General mitigation guidance

Common defensive patterns include:

  • Enforcing server-side authorization checks for every sensitive key operation
  • Restricting key creation, listing, and revocation to explicitly authorized roles
  • Applying least privilege to accounts, keys, and sending capabilities
  • Using secure-by-default permissions that deny access unless it is explicitly granted
  • Limiting the scope and domain permissions of API keys where possible
  • Reviewing and reducing trust in user-supplied identity or role data; derive authorization decisions from trusted server-side sources

Common defensive patterns include:

  • Enforcing server-side authorization checks for every sensitive key operation
  • Restricting key creation, listing, and revocation to explicitly authorized roles
  • Applying least privilege to accounts, keys, and sending capabilities
  • Using secure-by-default permissions that deny access unless it is explicitly granted
  • Limiting the scope and domain permissions of API keys where possible
  • Reviewing and reducing trust in user-supplied identity or role data; derive authorization decisions from trusted server-side sources

How teams detect issues like this

High-level approaches include:

  • Reviewing route handlers and middleware for authorization checks on each key operation
  • Using static analysis or code review rules to flag sensitive routes protected only by authentication
  • Testing authorization policies across member roles, including attempts to perform actions outside assigned permissions
  • Monitoring audit logs for unusual key creation, listing, or revocation activity
  • Enforcing policy checks in CI for sensitive API endpoints

High-level approaches include:

  • Reviewing route handlers and middleware for authorization checks on each key operation
  • Using static analysis or code review rules to flag sensitive routes protected only by authentication
  • Testing authorization policies across member roles, including attempts to perform actions outside assigned permissions
  • Monitoring audit logs for unusual key creation, listing, or revocation activity
  • Enforcing policy checks in CI for sensitive API endpoints

Sources

SourceLink
github.comgithub.com/0xdps/emailflare
github.comgithub.com/0xdps/emailflare/blob/d448ea205937a5e82683f89013d4c23159da5b7d/services/inbox-worker/src/routes/keys.ts
github.comgithub.com/0xdps/emailflare/commit/cf31f33bbb4a324d5353b8a5db0312fedc19618f
vulncheck.comvulncheck.com/advisories/emailflare-before-commit-cf31f33-missing-authorization-via-api-keys-routes

Frequently asked

questions

The described issue allows any authenticated member to use the affected key-management routes without the necessary authorization checks.

Yes. The attacker needs an authenticated account with access to the inbox service routes.

Apply server-side, action-specific authorization checks to listing, creating, and revoking keys, and deny access by default.

Treat authentication and authorization as separate controls, test permissions across roles, and review sensitive endpoints for least-privilege enforcement.

The described issue allows any authenticated member to use the affected key-management routes without the necessary authorization checks.

Yes. The attacker needs an authenticated account with access to the inbox service routes.

Apply server-side, action-specific authorization checks to listing, creating, and revoking keys, and deny access by default.

Treat authentication and authorization as separate controls, test permissions across roles, and review sensitive endpoints for least-privilege enforcement.

Find out what's already
exploitable in your codebase.