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

- **Severity:** HIGH 7.7
- **CVSS:** 7.7 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: None; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.59% (percentile 49, 2026-12-01)
- **CWE:** CWE-602
- **Published:** 2026-11-29T17:55:09.458Z
- **Modified:** 2026-12-01T20:18:58.313Z

## Who should check

- Anyone running Forgejo \>= 9.0.0, \< 15.0.12; \>= 16.0.0, \< 17.0.2

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

## Affected and fixed versions

- Forgejo: \>= 9.0.0, \< 15.0.12; \>= 16.0.0, \< 17.0.2 (cvelist)

## Technologies

Gitea / Forgejo (AI-matched)

## Mitigation

- Upgrade Forgejo to 17.0.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-138408. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-138408.md
Affected: Forgejo >= 9.0.0, < 15.0.12; >= 16.0.0, < 17.0.2
Fixed in: Forgejo 15.0.12, Forgejo 17.0.2

Steps:
1. Search this machine and project for Forgejo: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-138408 being exploited?

There is no confirmed exploitation: CVE-2026-138408 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.59% chance of exploitation in the next 30 days (as of 2026-12-01).

### How serious is CVE-2026-138408?

High: CVSS 7.7 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2026-138408?

Forgejo \>= 9.0.0, \< 15.0.12; \>= 16.0.0, \< 17.0.2.

### Is there a fix for CVE-2026-138408?

Yes. Fixed in Forgejo 15.0.12, Forgejo 17.0.2. Upgrade Forgejo to 17.0.2 or later.

### How do I check if I'm affected by CVE-2026-138408?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <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>
- other: <https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-published/17.0.2.md>
- other: <https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-published/15.0.12.md>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-138408>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-138408> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-138408>
