CVE-2022-0871
Missing Authorization in gogs/gogs
Missing Authorization in GitHub repository gogs/gogs prior to 0.12.5.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
8.2
Missing Authorization in gogs/gogs
Missing Authorization in GitHub repository gogs/gogs prior to 0.12.5.
- Record
CVE-2022-0871- CVSS 3.0
- 8.2 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
EUVDEUVD-2022-1432
8.2
Missing Authorization in GitHub repository gogs/gogs prior to 0.12.5.
- Record
EUVD-2022-1432- CVSS 3.0
- 8.2 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-gw5h-h6hj-f56g
8.2
Gogs vulnerable to improper PAM authorization handling
Impact
Expired PAM accounts and accounts with expired passwords are continued to be seen as valid. Installations use PAM as authentication sources are affected.
Patches
Expired PAM accounts and accounts with expired passwords are no longer being seen as valid. Users should upgrade to 0.12.5 or the latest 0.13.0+dev.
Workarounds
In addition to marking PAM accounts as expired, also disable/lock them. Running usermod -L <username> will add an exclamation mark to the password hash and would result in wrong passwords responses when trying to login.
References
https://huntr.dev/bounties/ea82cfc9-b55c-41fe-ae58-0d0e0bd7ab62/
For more information
If you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/issues/6810.
- Record
GHSA-gw5h-h6hj-f56g- CVSS 3.0
- 8.2 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
NVD
9.1
Missing Authorization in GitHub repository gogs/gogs prior to 0.12.5.
- Record
CVE-2022-0871- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - CVSS 3.0
- 8.2 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N - CVSS 2.0
- 5.8 Medium
AV:N/AC:M/Au:N/C:P/I:P/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
OSVALPINE-CVE-2022-0871
9.1
Missing Authorization in GitHub repository gogs/gogs prior to 0.12.5.
- Record
ALPINE-CVE-2022-0871- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-03
OSV
8.2
Missing Authorization in gogs/gogs
Missing Authorization in GitHub repository gogs/gogs prior to 0.12.5.
- Record
CVE-2022-0871- CVSS 3.0
- 8.2 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
OSVGHSA-gw5h-h6hj-f56g
8.2
Gogs vulnerable to improper PAM authorization handling
Impact
Expired PAM accounts and accounts with expired passwords are continued to be seen as valid. Installations use PAM as authentication sources are affected.
Patches
Expired PAM accounts and accounts with expired passwords are no longer being seen as valid. Users should upgrade to 0.12.5 or the latest 0.13.0+dev.
Workarounds
In addition to marking PAM accounts as expired, also disable/lock them. Running usermod -L <username> will add an exclamation mark to the password hash and would result in wrong passwords responses when trying to login.
References
https://huntr.dev/bounties/ea82cfc9-b55c-41fe-ae58-0d0e0bd7ab62/
For more information
If you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/issues/6810.
- Record
GHSA-gw5h-h6hj-f56g- CVSS 3.0
- 8.2 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
OSVGO-2022-0369 No score
Gogs vulnerable to improper PAM authorization handling in gogs.io/gogs
Gogs vulnerable to improper PAM authorization handling in gogs.io/gogs
- Record
GO-2022-0369- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
gogs.io/gogsGo |
before 0.12.5 | 0.12.5 |
gogsAlpine:v3.15 |
before 0.12.6-r0 | 0.12.6-r0 |
gogsAlpine:v3.16 |
before 0.12.6-r0 | 0.12.6-r0 |
gogsAlpine:v3.17 |
before 0.12.6-r0 | 0.12.6-r0 |
gogsAlpine:v3.18 |
before 0.12.6-r0 | 0.12.6-r0 |
gogsAlpine:v3.19 |
before 0.12.6-r0 | 0.12.6-r0 |
gogsAlpine:v3.20 |
before 0.12.6-r0 | 0.12.6-r0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases, references | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-0871 is a high vulnerability (CVSS 8.2) in Gogs, published March 11, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.24%, the 69th percentile. Fixed in gogs.io/gogs 0.12.5.
References
huntr.dev/bounties/ea82cfc9-b55c-41fe-ae58-0d0e0bd7ab62
github.com/gogs/gogs/commit/64102be2c90e1b47dbdd379873ba76c80d4b0e78
github.com/gogs/gogs/security/advisories/GHSA-gw5h-h6hj-f56g
nvd.nist.gov/vuln/detail/CVE-2022-0871
github.com/gogs/gogs/issues/6810
github.com/advisories/GHSA-gw5h-h6hj-f56g
security.alpinelinux.org/vuln/CVE-2022-0871
github.com/CVEProject/cvelistV5/tree/main/cves/2022/0xxx/CVE-2022-0871.json
github.com/gogs/gogs