Forgejo lets users spoof email verification and take over accounts
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA.
Summary
Forgejo from 9.0.0 before 15.0.12 and from 16.0.0 before 17.0.2 is affected. A flaw in the account email handling (CWE-602) lets an authenticated user make an unverified secondary email address their primary address when REGISTER_EMAIL_CONFIRM is enabled. Forgejo's OpenID Connect provider then issues signed ID tokens claiming email_verified: true for that address, letting an attacker take over accounts on external services that match users by verified email.
Written with Claude Haiku 5.5 from the sources below · 2026-11-29
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Upgrade Forgejo to 15.0.12 or 17.0.2, the fixed versions listed for the affected ranges.
Written with Claude Haiku 5.5 from the sources below · 2026-11-29
- Fix · CNA Forgejo (Forgejo) Fixed in 15.0.12, 17.0.2
Timeline
- 2026-11-29 Threatist record created from CVE-2026-138408
- 2026-11-29 Alias added: GHSA-99gf-43gm-6rwh
References
Patch 5
- https://codeberg.org/forgejo/forgejo/pulls/15298
- https://codeberg.org/forgejo/forgejo/pulls/15299
- https://codeberg.org/forgejo/forgejo/commit/0c4609133e9ec7da5cb061668f533ba42894c824
- https://codeberg.org/forgejo/forgejo/commit/04834f11abbdc164075aaf2bafaab375c555e832
- https://codeberg.org/forgejo/forgejo/commit/b3460f95c5aade136198ed5ca63a625d2134549c
More Forgejo vulnerabilities
- TI-2026-83009 Forgejo server-side request forgery via OpenID Discovery CVSS 4.0MEDIUM 6.9
- TI-2026-83010 Path traversal in Forgejo restore-repo lets attackers read files CVSS 4.0MEDIUM 6.8
- TI-2026-83011 Forgejo API lets authenticated users read other users' SSH keys CVSS 4.0MEDIUM 5.3
- TI-2026-60375 Forgejo before 16.0.4 allows remote code execution via a crafted template repository… CVSS 3.1CRITICAL 9.9
- TI-2026-42282 Forgejo < 15.0.3 - Stored XSS via Actions Run Full Name Rendering CVSS 4.0LOW 2.1
- TI-2025-42393 Forgejo before 13.0.2 allows attackers to write to unintended files, and possibly obtain… CVSS 4.0CRITICAL 9.5
Sources
- CVE-2026-138408 · CVE Program
- CVE-2026-138408 · NVD
- FIRST EPSS
- GHSA-99gf-43gm-6rwh · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences