CVE-2026-138408

Forgejo Email Verified Spoofing Vulnerability

Published Nov 29, 2026 CVSS 3.1 · 7.7 High EPSS < 1% KEV · Not listed
Description
In Forgejo before 15.0.12 and 16.x and 17.x before 17.0.2, email_verified can be spoofed, sometimes leading to account takeover in external services that rely on Forgejo for authentication. It allows an authenticated user to set an unverified secondary email address as their primary email address when [service] REGISTER_EMAIL_CONFIRM is enabled. Although the web UI hides the "Make primary" button for unverified addresses, the backend POST /user/settings/account/email handler (EmailPost in routers/web/user/setting/account.go) and MakeEmailAddressPrimary in services/user/email.go did not check whether the email address was activated. Because Forgejo's OpenID Connect (OIDC) provider derives the email_verified claim from user.IsActive rather than the primary email address's activation state, an attacker can obtain signed ID tokens asserting email_verified: true for an arbitrary unverified email address, and potentially take over accounts on external relying parties that match users by verified email.

Analysis

AI-generated

Technical impact

Forgejo prior to specific release versions allows an authenticated user to elevate an unverified secondary email to primary without proper verification. This creates a false email_verified claim in OIDC tokens and permits the attacker to impersonate the real user in external relying parties that use the claim for authentication. The vulnerability is a CWE-602 inappropriate influence flaw.

Affected Systems

Affected versions are all releases of Forgejo prior to 15.0.12, all 16.x releases, and all 17.x releases before 17.0.2. The product is listed as Forgejo:Forgejo along with the corresponding CPE strings.

Risk and Exploitability

The CVSS score is 7.7, indicating high severity with no exploit probability data available. It is not listed in the CISA KEV catalog. The likely attack vector requires an authenticated user with access to the account; the exploit can target external services that trust Forgejo’s OIDC email_verified claim, potentially allowing complete takeover of legitimate user accounts on other systems.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Forgejo to version 15.0.12 or newer, including all 16.x releases and 17.0.2 or later.
  • After upgrading, remove or deactivate any unverified secondary email addresses and ensure no unverified email is set as primary.
  • Review external relying parties that trust the OIDC email_verified claim and enforce additional verification or stricter identity checks.

Generated by OpenCVE AI on November 29, 2026 at 19:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title Forgejo Email Verified Spoofing Vulnerability
Type Values Removed Values Added
Description In Forgejo before 15.0.12 and 16.x and 17.x before 17.0.2, email_verified can be spoofed, sometimes leading to account takeover in external services that rely on Forgejo for authentication. It allows an authenticated user to set an unverified secondary email address as their primary email address when [service] REGISTER_EMAIL_CONFIRM is enabled. Although the web UI hides the "Make primary" button for unverified addresses, the backend POST /user/settings/account/email handler (EmailPost in routers/web/user/setting/account.go) and MakeEmailAddressPrimary in services/user/email.go did not check whether the email address was activated. Because Forgejo's OpenID Connect (OIDC) provider derives the email_verified claim from user.IsActive rather than the primary email address's activation state, an attacker can obtain signed ID tokens asserting email_verified: true for an arbitrary unverified email address, and potentially take over accounts on external relying parties that match users by verified email.
First Time appeared Forgejo
Forgejo forgejo
Weaknesses CWE-602
CPEs cpe:2.3:a:forgejo:forgejo:*:*:*:*:*:*:*:*
Vendors & Products Forgejo
Forgejo forgejo
References
Metrics cvssV3_1

{'score': 7.7, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N'}

Weaknesses
  • CWE-602

    Client-Side Enforcement of Server-Side Security

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Nov 29, 2026, 5:55 PM
Reserved
Nov 29, 2026, 5:55 PM
Status
Deferred
Published
Nov 29, 2026, 6:17 PM
Modified
Nov 29, 2026, 6:17 PM