Summary
CVE-2026-27657 is a high-severity improper authorization vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting Gitea Open Source Git Server in all versions prior to 1.25.5. By exploiting a missing ownership check in the email-settings functionality, an attacker can reassign another user’s registered email address as their own primary address, creating a direct path to full account takeover. The vulnerability carries a CVSS v3.1 score of 7.5 (High).
Technical details
- Root cause: The
EmailPosthandler responsible for the "make primary" email operation failed to verify that the targeted email record actually belonged to the authenticated requester. TheMakeActiveEmailPrimaryfunction accepted an email ID without validating ownership, allowing any caller to supply an arbitrary email ID — including one registered to a different account. - Trigger conditions: An attacker submits a crafted request to the email settings endpoint, specifying the email record ID of a victim user instead of their own. No additional privileges beyond access to the endpoint are required; on Gitea instances with open registration enabled, an attacker can self-register to obtain the necessary access.
- Attack vector: Network-accessible over HTTP/HTTPS with low complexity and no user interaction required.
- Impact: By seizing another user’s primary email address, an attacker can subsequently trigger a password-reset flow to that email, effectively taking over the victim’s account — including access to all repositories, organization memberships, API tokens, and SSH keys associated with it. Integrity impact is rated High; there is no direct confidentiality or availability impact from this specific flaw.
Affected software
- Gitea Open Source Git Server — all versions before 1.25.5
Severity
- CVSS v3.1 Base Score: 7.5 (High)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Mitigation and recommended actions
- Immediate action: Upgrade to Gitea 1.25.5 or later. The fix adds an ownership/existence check in the
EmailPosthandler and enforces caller-owned validation insideMakeActiveEmailPrimary. The patch was released in early July 2026. - If immediate upgrade is not possible: Restrict network access to your Gitea instance to trusted sources and disable open registration to raise the effective attack barrier while patching is planned.
IONIX Status
The IONIX research team is tracking ongoing exploitation attempts and recommends immediate patching. Potentially affected assets are outlined in this post.

