CVE-2021-45330: Improper Privilege Management in Gitea
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.78773%
CWE
Published
2/10/2022
Updated
1/28/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
code.gitea.io/gitea | go | < 1.6.0 | 1.6.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from API routes accepting session cookies without requiring fresh authentication. The key fix in PR #4840 modified the reqToken
middleware to strictly require tokens or basic auth. This indicates the authentication logic in this middleware was the root cause - it previously allowed cookie-based sessions to persist server-side after logout, enabling privilege escalation through session reuse.