Forgejo Patches High-Severity Email Verification Flaw

Forgejo has released patches for a high-severity vulnerability (CVE-2026-138408) that allows authenticated users to spoof email verification status. The flaw, rated 7.7 on the CVSS scale, enables attackers to set unverified secondary emails as primary addresses, potentially leading to account takeover in external services relying on Forgejo for authentication.
Key points
- The vulnerability affects Forgejo versions 9.0.0 to 15.0.11 and 16.0.0 to 17.0.1.
- It allows an authenticated user to designate an unverified secondary email as their primary address, bypassing client-side restrictions.
- Forgejo's OpenID Connect provider derives the 'email_verified' claim from user activation status rather than email verification, enabling attackers to obtain signed tokens asserting verified status for unverified emails.
- This can lead to account takeover on external relying parties that match users by verified email addresses.
- Patches are available in versions 15.0.12 and 17.0.2, addressing the backend logic in the email settings handler.
Background
Forgejo is an open-source software forge that forked from Gitea in 2022. It is managed by Codeberg e.V. and has adopted semantic versioning since 2024. Recent security disclosures in the archive include high-severity flaws in Hitachi's RV3000 Log Monitor, the browser-use library, Formance Ledger, and D-Link routers, highlighting a broader trend of critical vulnerabilities in software and hardware components.
Why it matters
The vulnerability undermines the integrity of email verification in Forgejo's authentication system, posing a significant risk to organizations using Forgejo for single sign-on or identity management. Exploitation could lead to unauthorized access to external services that trust Forgejo's OIDC tokens.
What to watch
Users of affected Forgejo versions should upgrade to 15.0.12 or 17.0.2 to mitigate the risk. Organizations relying on Forgejo for authentication should review their OIDC configurations and ensure that email verification checks are robust against spoofing.
Want the full story? Read the original reporting
Read on CVEs | Zero Wire | Cloudflare Radar