CSIRTS // UNIFIED SECURITY ADVISORY FEEDSYS ● ONLINE · POWERED BY INTELFUSIONS.COM

GHSA-5c3f-6486-3g7g: Gogs's password-reset tokens use account-activation lifetime, ignoring RESET_PASSWORD_CODE_LIVES

mediumCVSS 6.8CVE-2026-52809
Summary Password-reset tokens are generated using conf.Auth.ActivateCodeLives (the account-activation lifetime), not conf.Auth.ResetPasswordCodeLives. The token lifetime is baked into the token itself at generation time and is re-extracted from the token at verification time, making RESET_PASSWORD_CODE_LIVES irrelevant to actual enforcement. When an administrator configures a shorter reset window (e.g., 10 minutes) for compliance or security reasons, reset tokens remain exploitable for the full activation lifetime instead, while the reset email falsely advertises the shorter expiry. Severity Medium (CVSS 3.1: 6.8) CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N - Attack Vector: Network — the reset endpoint is reachable over HTTP/S. - Attack Complexity: High — successful exploitation requires (1) the instance to be configured with RESET_PASSWORD_CODE_LIVES < ACTIVATE_CODE_LIVES, AND (2) the attacker to have intercepted the victim's reset token (e.g., from a compromised or shared email inbox). - Privileges Required: None — no Gogs account is required. - User Interaction: Required — the victim must have triggered a password-reset request. - Scope: Unchanged — the impact is confined to the victim's Gogs account. - Confidentiality Impact: High — successful exploitation leads to account takeover, exposing all private repositories and data. - Integrity Impact: High — the attacker can change the victim's password and gain full write access. - Availability Impact: None. Affected component - internal/userx/userx.go — GenerateActivateCode() (line 39) - internal/email/email.go — SendResetPasswordMail() (line 132) - internal/route/user/auth.go — verifyUserActiveCode() (lines 426–439) and ResetPasswdPost() (line 621) CWE - CWE-324: Use of a Key Past Its Expiration Date - CWE-613: Insufficient Session Expiration Description The reset token lifetime is hardcoded to ActivateCodeLives at generation GenerateActivateCode (called for both account activation and password reset)

Details

Source
GitHub Security Advisories (INTL · database · site)
Severity
medium — CVSS 6.8
Published
2026-06-23
Last updated
2026-07-21
Exploitation
Not in CISA KEV at last sync

Original advisory: https://github.com/advisories/GHSA-5c3f-6486-3g7g

Exploitation outlook

EPSS (FIRST.org) estimates each CVE’s probability of exploitation in the next 30 days — here is the CSIRTS.com read on those numbers.

Referenced CVEs

CVECSIRTS overviewExternal
CVE-2026-52809coverage & exploitation statusNVD · CVE.org

More from GitHub Security Advisories