All vulnerabilities

Servers and applications

CVE-2026-52809

Password-reset tokens use account-activation lifetime, ignoring RESET_PASSWORD_CODE_LIVES

Severity
Medium 6.8
Published
19 Jun 2026
Last changed
3 Nov 2026
Added to UpHeron
3 Nov 2026
Fixed in
0.14.3
Exploit chance
0.2% in the next 30 daysHigher than 8% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
CWE-324Insufficient session expiration (CWE-613)
Attack
Over the network · Only under certain conditions · No login needed · Needs someone to click or open something
Attacker can
Read data · Change data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Also known as
GHSA-5c3f-6486-3g7g
Sources
CVE Program, Project advisories (GitHub)

Description

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.

  • Victim requests reset: POST /user/forget_password → SendResetPasswordMail generates a token embedding ActivateCodeLives = 180 at bytes 12–17.
  • Email delivered: The reset email says "link valid for 10 minutes" (from ResetPwdCodeLives in the template) but the embedded lifetime is 180.
  • RESET_PASSWORD_CODE_LIVES window closes: After 10 minutes the victim believes the link has expired.
From gogs/gogs's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
GogsServers and applications · cna:gogs|gogs
  • Every version before 0.14.3
GogsServers and applications · github:gogs/gogs
  • Every version before 0.14.3

About Gogs

free forge based on Git written in Go

From Wikidata, CC0 1.0.
Docker Hub pulls
94,040,857Docker Hub, 15 Nov 2026
GitHub stars
47,939GitHub, 15 Nov 2026
Forks
5,082GitHub, 15 Nov 2026
Latest release
v0.14.4GitHub, 15 Nov 2026
Released
12 Nov 2026GitHub
Developer
FLOSS contributorWikidata
License
Expat licenseWikidata
Written in
Go, Cascading Style Sheets, JavaScriptWikidata
First released
11 Feb 2014Wikidata
First published on GitHub
12 Feb 2014GitHub

References