# CVE-2026-138408: In Forgejo before 15.0.12 and 16.x and 17.x before 17.0.2, emailverified can be spoofed, sometimes leading to account takeover in external…

- Severity: High 7.7 (CVSS:3.1, scored by mitre) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.59%, higher than 49% of CVEs (2026-12-01)
- Published: 2026-11-29T17:55:09.458Z
- Modified: 2026-11-29T17:55:09.458Z
- Weaknesses: CWE-602
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Forgejo Forgejo: from 9.0.0 before 15.0.12; from 16.0.0 before 17.0.2

## References

- <https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-published/17.0.2.md> (release-notes)
- <https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-published/15.0.12.md> (release-notes)
- <https://codeberg.org/forgejo/forgejo/pulls/15298> (patch)
- <https://codeberg.org/forgejo/forgejo/pulls/15299> (patch)
- <https://codeberg.org/forgejo/forgejo/commit/0c4609133e9ec7da5cb061668f533ba42894c824> (patch)
- <https://codeberg.org/forgejo/forgejo/commit/04834f11abbdc164075aaf2bafaab375c555e832> (patch)
- <https://codeberg.org/forgejo/forgejo/commit/b3460f95c5aade136198ed5ca63a625d2134549c> (patch)

## Sources

- CVE List: [CVE-2026-138408](https://www.cve.org/CVERecord?id=CVE-2026-138408), CVE Terms of Use, modified 2026-11-29

---

Page: https://cve.day/CVE-2026-138408 · Whole record: https://cve.day/CVE-2026-138408.json · Rebuilt by cve.day 2026-11-29T18:07:08.161Z
