Description
Gogs is an open source self-hosted Git service. Prior to 0.14.3, 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. This vulnerability is fixed in 0.14.3.
Published: 2026-06-24
Score: 6.8 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Gogs is an open source self‑hosted Git service. Before version 0.14.3, password‑reset tokens are created using the account‑activation lifetime configuration (conf.Auth.ActivateCodeLives) instead of the intended reset‑password lifetime setting (conf.Auth.ResetPasswordCodeLives). The token’s lifetime is baked into the token itself at generation time and is re‑extracted from the token at verification time, so the RESET_PASSWORD_CODE_LIVES setting has no effect on actual enforcement. If an administrator configures a shorter reset window (for example 10 minutes) for compliance or security, the reset tokens remain usable for the full activation period, while the reset email incorrectly claims the shorter expiry. This flaw, which represents a time‑of‑check to time‑of‑use weakness (CWE‑324) and improper handling of authentication tokens (CWE‑613), allows an attacker who obtains a reset token to gain unauthorized access long after the password‑reset window the administrator intended.

Affected Systems

The vulnerability affects installations of Gogs prior to version 0.14.3. Administrators using earlier releases should review their activation and reset token settings and upgrade to 0.14.3 or later to ensure compliance with the configured reset window.

Risk and Exploitability

The vulnerability carries a CVSS score of 6.8 and is not listed in the CISA KEV catalog. Since the exploit path requires possession of a valid reset token—commonly obtained via phishing or interception of the reset email—the likelihood of exploitation is moderate. No publicly available exploits have been reported, and the EPSS score is not available. Overall, the risk is significant enough to warrant upgrading promptly.

Generated by OpenCVE AI on June 25, 2026 at 00:44 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Gogs to version 0.14.3 or later, where the bug is fixed.
  • Confirm that conf.Auth.ResetPasswordCodeLives is set to the intended token lifespan after the upgrade.
  • If upgrade is not immediately possible, align conf.Auth.ActivateCodeLives with the reduce unauthorized token validity, and consider disabling password reset functionality temporarily while monitoring for suspicious activity.

Generated by OpenCVE AI on June 25, 2026 at 00:44 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-5c3f-6486-3g7g Gogs's password-reset tokens use account-activation lifetime, ignoring RESET_PASSWORD_CODE_LIVES
History

Wed, 24 Jun 2026 21:15:00 +0000

Type Values Removed Values Added
Description Gogs is an open source self-hosted Git service. Prior to 0.14.3, 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. This vulnerability is fixed in 0.14.3.
Title Gogs: Password-reset tokens use account-activation lifetime, ignoring RESET_PASSWORD_CODE_LIVES
Weaknesses CWE-324
CWE-613
References
Metrics cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-24T20:29:29.701Z

Reserved: 2026-06-08T18:02:19.732Z

Link: CVE-2026-52809

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-25T00:45:05Z

Weaknesses
  • CWE-324

    Use of a Key Past its Expiration Date

  • CWE-613

    Insufficient Session Expiration