All vulnerabilities

Servers and applications

GHSA-pmfh-wh5m-gmjm

Password-reset code doubles as a login token through account activation, bypassing the password and 2FA

Severity
High 7.4
Published
24 Nov 2026
Last changed
24 Nov 2026
Added to UpHeron
24 Nov 2026
Weakness
Improper authentication (CWE-287)CWE-308Weak password recovery (CWE-640)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Read data · Change data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Sources
Project advisories (GitHub)

Description

Account-activation codes and password-reset codes are the same token. The activation endpoint accepts any valid code, including for an account that is already active, and signs the holder in. It never asks for the second factor.

So anyone holding a user's password-reset link gets a full session as that user, with no password and no TOTP, and the password stays unchanged. The victim sees nothing. 2FA exists to stop exactly this case: an attacker who has access to the victim's mailbox.

Reproduced on v0.14.3 through GET /user/activate?code=, and on main @ dbbd717e through POST /api/web/user/activate/complete.

userx.GenerateActivateCode produces both the activation code and the reset code, and verifyUserActiveCode verifies both. GHSA-5c3f-6486-3g7g documents this sharing for the lifetime issue.

The activation handlers then do the following.

v0.14.3, internal/route/user/auth.go, Activate:

main, cmd/gogs/internal/web/webapi_user.go, postUserActivateComplete:

From gogs/gogs's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
GogsServers and applications · github:gogs/gogs
  • Every version up to 0.14.3

About Gogs

free forge based on Git written in Go

From Wikidata, CC0 1.0.
Docker Hub pulls
94,097,312Docker Hub, 22 Nov 2026
GitHub stars
47,981GitHub, 22 Nov 2026
Forks
5,081GitHub, 22 Nov 2026
Latest release
v0.14.4GitHub, 22 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