1. Archivio CVE
  2. 2026
  3. CVE-2026-138408

CVE-2026-138408

7.7 Gravità alta CVSS v3.1 · fonte NVD CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N 7.7 – Alta

Descrizione

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.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
forgejo forgejo >= 9.0.0 < 15.0.12 –
forgejo forgejo >= 16.0.0 < 17.0.2 –
Tutte le 13 vulnerabilità di Forgejo

Tipo di vulnerabilità

CWE-602 Client-Side Enforcement of Server-Side Security

The product includes a server that relies on the client to implement a protection mechanism that is intended to protect the server.

Impatto sui sistemi

AmbitoImpatto
Disponibilità Interruzione del servizio: arresto o riavvio
Controllo degli accessi Aggirare i meccanismi di protezione, Ottenere privilegi o assumere un’altra identità

Come si previene

Architettura e progettazione For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server. Even though client-side checks provide minimal benefits with respect to server-side security, they are still useful. First, they can support intrusion detection. If the server receives input that should have been rejected by the client, then it may be an indication of an attack. Second, client-side error-checking can provide helpful feedback to the user about the expectations for valid input. Third, there may be a reduction in server-side processing time for accidental input errors, although this is typically a small savings.
Architettura e progettazione If some degree of trust is required between the two entities, then use integrity checking and strong authentication to ensure that the inputs are coming from a trusted source. Design the product so that this trust is managed in a centralized fashion, especially if there are complex or numerous communication channels, in order to reduce the risks that the implementer will mistakenly omit a check in a single code path.

Le indicazioni di mitigazione sono riportate nella lingua originale del catalogo CWE del MITRE.

Tutte le 155 CVE di tipo CWE-602, con andamento e prevenzione

Fonte: catalogo CWE del MITRE · cwe.mitre.org