Servers and applications
GHSA-f9vc-qvc8-p7cf
Two-factor authentication bypass in the Gogs web API through a leading-slash path mismatch
- Severity
- High 8.1
- Published
- 18 Nov 2026
- Last changed
- 18 Nov 2026
- Added to UpHeron
- 18 Nov 2026
- Attack
- Over the network · Needs a user account · No user action needed
- Attacker can
- Read data · Change data
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N- Sources
- Project advisories (GitHub)
Description
An attacker who knows a user's password but not the user's second factor can send HTTP Basic credentials to a path with an extra leading slash, such as //api/web/user/settings/two-factor. The authentication check compares the raw request path against the literal prefix /api/web/, so the extra slash makes the check skip and the password is accepted. The router trims leading slashes before matching and still sends the request to the intended handler.
The attacker can then call the web API routes that change credentials and two-factor authentication. Disabling two-factor authentication with a single DELETE request is enough. After that, a normal password sign-in succeeds without any second factor. On an administrator account this gives full site administration.
Affected software
| Software | Affected versions |
|---|---|
GogsServers and applications · github:gogs/gogs |
|
About Gogs
free forge based on Git written in Go
- 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
Website Source code Docker image
Vulnerabilities in Gogs
- In our list
- 88
- Published in the last 12 months
- 54
- Critical, last 12 months
- 5
- High, last 12 months
- 23
- Known exploited
- 1
- CVE-2026-133113Gogs through 0.14.4 Protected Branch Allowlist Bypass via Pull Request MergeHigh 7.1 19 Nov 2026
- GHSA-8r2x-49gj-h6rmProtected Branch Bypass via Pull Request Merge Due to Missing Hook Environment VariablesHigh 8.3 18 Nov 2026
- GHSA-7cvr-7cff-2mrgLDAP login selects the local account by email while the directory identity is searched by uid: an unrelated directory entry whose uid attribute equals a victim's Gogs email authenticates as that account - including site adminsMedium 18 Nov 2026
- GHSA-6972-pq3q-8w9rStored cross-site scripting in Gogs commit subjects through the external issue tracker formatHigh 8.7 18 Nov 2026
- GHSA-p27c-f9fr-4jmwRemote process crash in Gogs diff rendering via a quoted rename pathHigh 7.5 16 Nov 2026
- GHSA-vghx-gp7m-xpx2CSRF: Milestone open/close via GET request (CWE-352)Low 16 Nov 2026
References
- GitHub Advisory Database https://github.com/advisories/GHSA-f9vc-qvc8-p7cf
- github.com https://github.com/gogs/gogs/security/advisories/GHSA-f9vc-qvc8-p7cf