/

CVE-2026-119049

Severity:

HIGH RISK

(7.6)

Authorization Bypass (CWE-639) in FreeMail Mailbox

CVE-2026-119049

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-639

Impact:

Mailbox Account Takeover and Unauthorized Data Access

Severity:

HIGH RISK

(7.6)

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

FreeMail contains an authorization bypass in the mailbox creation endpoint that may allow an authenticated user to claim an existing mailbox associated with another user.

By supplying a known victim address, an attacker could become a co-owner and access messages, verification codes, forwarding settings, and mailbox deletion functions.

FreeMail contains an authorization bypass in the mailbox creation endpoint that may allow an authenticated user to claim an existing mailbox associated with another user.

By supplying a known victim address, an attacker could become a co-owner and access messages, verification codes, forwarding settings, and mailbox deletion functions.

Affected context

The issue occurs in FreeMail deployments where the POST /api/create endpoint permits mailbox ownership changes through assignMailboxToUser without sufficiently verifying that the requesting user is authorized to claim the specified mailbox. Exploitation depends on the endpoint being reachable by authenticated users and on the victim's mailbox address being discoverable or guessable.

The issue occurs in FreeMail deployments where the POST /api/create endpoint permits mailbox ownership changes through assignMailboxToUser without sufficiently verifying that the requesting user is authorized to claim the specified mailbox. Exploitation depends on the endpoint being reachable by authenticated users and on the victim's mailbox address being discoverable or guessable.

Exploit preconditions

  • Attack surface: The authenticated POST /api/create mailbox-management API
  • Required access: A valid FreeMail user account
  • Known information: The target user's mailbox address
  • Trigger point: Processing a mailbox-claim or ownership-assignment request
  • Why exploitation is possible: Authorization checks do not adequately confirm that the requester is permitted to assign the existing mailbox to their account
  • Attack surface: The authenticated POST /api/create mailbox-management API
  • Required access: A valid FreeMail user account
  • Known information: The target user's mailbox address
  • Trigger point: Processing a mailbox-claim or ownership-assignment request
  • Why exploitation is possible: Authorization checks do not adequately confirm that the requester is permitted to assign the existing mailbox to their account

Why this happens

The vulnerability is caused by insufficient object-level authorization when processing a user-controlled mailbox identifier or address. The application appears to treat knowledge of a valid mailbox address as sufficient to perform an ownership-related action, rather than independently verifying the requester's relationship to that mailbox.

This maps to CWE-639: Authorization Bypass Through User-Controlled Key, where an attacker manipulates an identifier that references another user's resource and the server fails to enforce ownership or access-control requirements.

The vulnerability is caused by insufficient object-level authorization when processing a user-controlled mailbox identifier or address. The application appears to treat knowledge of a valid mailbox address as sufficient to perform an ownership-related action, rather than independently verifying the requester's relationship to that mailbox.

This maps to CWE-639: Authorization Bypass Through User-Controlled Key, where an attacker manipulates an identifier that references another user's resource and the server fails to enforce ownership or access-control requirements.

Potential impact

  • An attacker may gain co-owner access to another user's mailbox
  • Private messages and verification codes could be exposed
  • Mail forwarding settings could be changed without authorization
  • Existing mail could be deleted
  • Account recovery or secondary-service compromise could become possible
  • Mailbox integrity and availability could be affected
  • An attacker may gain co-owner access to another user's mailbox
  • Private messages and verification codes could be exposed
  • Mail forwarding settings could be changed without authorization
  • Existing mail could be deleted
  • Account recovery or secondary-service compromise could become possible
  • Mailbox integrity and availability could be affected

General mitigation guidance

Mitigation generally focuses on enforcing server-side, object-level authorization for every mailbox operation.

Common defensive patterns include:

  • Verifying mailbox ownership and permitted relationships independently of user-supplied identifiers
  • Requiring explicit, authenticated consent from the current mailbox owner for ownership changes
  • Separating mailbox discovery, sharing, and ownership-transfer workflows
  • Denying access by default when the requester-to-mailbox relationship is ambiguous
  • Using opaque, non-guessable resource identifiers where appropriate, without treating obscurity as authorization
  • Applying least privilege to mailbox-management operations
  • Auditing ownership changes, forwarding updates, and destructive actions
  • Limiting access to messages and verification codes according to narrowly scoped permissions

Mitigation generally focuses on enforcing server-side, object-level authorization for every mailbox operation.

Common defensive patterns include:

  • Verifying mailbox ownership and permitted relationships independently of user-supplied identifiers
  • Requiring explicit, authenticated consent from the current mailbox owner for ownership changes
  • Separating mailbox discovery, sharing, and ownership-transfer workflows
  • Denying access by default when the requester-to-mailbox relationship is ambiguous
  • Using opaque, non-guessable resource identifiers where appropriate, without treating obscurity as authorization
  • Applying least privilege to mailbox-management operations
  • Auditing ownership changes, forwarding updates, and destructive actions
  • Limiting access to messages and verification codes according to narrowly scoped permissions

How teams detect issues like this

Detection approaches commonly include:

  • Static analysis and code review rules for endpoints that use client-supplied identifiers to select authorization targets
  • Tests that attempt cross-user access to mailbox creation, sharing, forwarding, and deletion operations
  • Review of authorization middleware and service-layer checks for consistent ownership validation
  • Policy enforcement requiring explicit authorization checks before resource mutation
  • Monitoring for unusual mailbox claims, ownership changes, forwarding updates, and bulk deletion activity
  • Automated application security testing that exercises horizontal privilege-boundary violations

Detection approaches commonly include:

  • Static analysis and code review rules for endpoints that use client-supplied identifiers to select authorization targets
  • Tests that attempt cross-user access to mailbox creation, sharing, forwarding, and deletion operations
  • Review of authorization middleware and service-layer checks for consistent ownership validation
  • Policy enforcement requiring explicit authorization checks before resource mutation
  • Monitoring for unusual mailbox claims, ownership changes, forwarding updates, and bulk deletion activity
  • Automated application security testing that exercises horizontal privilege-boundary violations

Sources

SourceLink
github.comgithub.com/idinging/freemail
github.comgithub.com/idinging/freemail/blob/a95c1710e7eeb9f2c74a49ef962f4f43a36695b3/src/db/users.js#L137-L163
github.comgithub.com/idinging/freemail/commit/62ed3afdbb4de90a135c12de928e586caf01b5a1
github.comgithub.com/idinging/freemail/issues/73
github.comgithub.com/idinging/freemail/releases/tag/v5.3.2
vulncheck.comvulncheck.com/advisories/freemail-before-5.3.2-authorization-bypass-via-api-create-mailbox-claiming

Frequently asked

questions

Yes, if the mailbox-management API is exposed through the application and an attacker can authenticate. Exploitation does not necessarily require local access to the FreeMail server.

The attacker generally needs a valid FreeMail account and knowledge of the target mailbox address. The decisive weakness is the missing or insufficient ownership check.

Enforce server-side object-level authorization for every mailbox operation, and require explicit approval from the current owner before changing mailbox ownership or sharing relationships.

Use deny-by-default authorization, test requests across separate user accounts, avoid trusting client-supplied resource identifiers, and monitor sensitive ownership and forwarding changes.

Yes, if the mailbox-management API is exposed through the application and an attacker can authenticate. Exploitation does not necessarily require local access to the FreeMail server.

The attacker generally needs a valid FreeMail account and knowledge of the target mailbox address. The decisive weakness is the missing or insufficient ownership check.

Enforce server-side object-level authorization for every mailbox operation, and require explicit approval from the current owner before changing mailbox ownership or sharing relationships.

Use deny-by-default authorization, test requests across separate user accounts, avoid trusting client-supplied resource identifiers, and monitor sensitive ownership and forwarding changes.

Find out what's already
exploitable in your codebase.