CVE-2026-138408
- CVE-2026-138408
- GHSA-99gf-43gm-6rwh
- EUVD-2026-137805
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.
Text from the CVE.org record.
Recommendation
Forgejo
- If you run a version from 16.0.0 to before 17.0.2update to 17.0.2 or laterMajor version change: expect breaking changes
- If you run a version from 9.0.0 to before 15.0.12update to 15.0.12 or laterMajor version change: expect breaking changes
Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
Forgejo
Affected versions Fixed in from 16.0.0 to before 17.0.2 17.0.2 from 9.0.0 to before 15.0.12 15.0.12
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.