CVE-2026-138408: 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 extern…

CVE-2026-138408 affects 62 listed versions of Forgejo in the Dawnsentry catalogue.

7.7CVSS high
None knownexploitation
under 1%EPSS (next 30 days)
29 November 2026published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

Forgejo

62 of 197 listed versions are affected. Fixed in 17.0.2, 15.0.12. The newest release, 17.0.2, is not affected.

17.0.1 17.0.0 16.0.7 16.0.6 16.0.5 16.0.4 16.0.3 16.0.2 16.0.1 16.0.0 15.0.11 15.0.10 15.0.9 15.0.8 15.0.7 15.0.6 15.0.5 15.0.4 15.0.3 15.0.2 15.0.1 15.0.0 14.0.5 14.0.4 14.0.3 14.0.2 14.0.1 14.0.0 13.0.5 13.0.4 13.0.3 13.0.2 13.0.1 13.0.0 12.0.4 12.0.3 12.0.2 12.0.1 12.0.0 11.0.16 11.0.15 11.0.14 11.0.13 11.0.12 11.0.11 11.0.10 11.0.9 11.0.8 11.0.7 11.0.6 11.0.5 11.0.4 11.0.3 11.0.2 10.0.3 10.0.2 10.0.1 10.0.0 9.0.3 9.0.2 and 2 more

What it is

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.

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N (MITRE)

Published by MITRE on 29 November 2026. Last changed 1 December 2026.

Sources

Check one version you run: look CVE-2026-138408 up, or pick a product and version in the quick lookup.

Updated 2 December 2026.