Vulnerability record · CVE-2022-1058 · published 24 March 2022
CVE-2022-1058: Gitea login open redirect allows credential phishing
Gitea · Gitea
Gitea before 1.16.5 contains an open redirect on the login flow (CWE-601). An attacker can craft a login URL that sends the victim to an arbitrary external site after authentication, which is useful for phishing and credential theft. The flaw is network-reachable and requires the victim to click a link, but no attacker authentication is needed.
Description
Open Redirect on login in GitHub repository go-gitea/gitea prior to 1.16.5.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Automated analysis
medium priorityThe CVSS score is 6.1 (medium) and exploitation requires user interaction, but high EPSS and a public exploit reference raise the practical risk.
What it is
Gitea before 1.16.5 contains an open redirect on the login flow (CWE-601). An attacker can craft a login URL that sends the victim to an arbitrary external site after authentication, which is useful for phishing and credential theft. The flaw is network-reachable and requires the victim to click a link, but no attacker authentication is needed.
Impact
An attacker gains the ability to redirect a victim from a trusted Gitea login page to an attacker-controlled site, enabling convincing phishing or malware delivery. There is no direct code execution or data disclosure from the redirect itself.
Attack surface
Reached over the network via a crafted login URL; the CVSS vector shows PR:N and UI:R, so no authentication is required but the victim must interact with the link. The redirect is triggered during the login process.
Exploitation
Not listed in CISA KEV, but EPSS is 0.53177 (98.9th percentile) and the huntr.dev reference is tagged Exploit, indicating public exploit detail exists. No ransomware usage is documented.
What to do
- Upgrade Gitea to 1.16.5 or later, which contains the patch commit e3d8e92bdc67562783de9a76b5b7842b68daeb48.
- If immediate upgrade is not possible, restrict or validate redirect targets on the login endpoint and block external redirect parameters.
- Educate users to verify the destination domain after logging in and to treat unexpected login links as suspicious.
- Monitor and filter outbound redirects from the Gitea login path to untrusted external domains at the web proxy or WAF.
Detection
- Review web/proxy logs for requests to the Gitea login endpoint containing external URL parameters or redirect targets.
- Alert on login responses that issue redirects to domains outside the organization's trusted set.
- Correlate huntr.dev or public exploit payload patterns against Gitea access logs for the login path.
- Audit Gitea version inventory to identify instances below 1.16.5.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://github.com/go-gitea/gitea/commit/e3d8e92bdc67562783de9a76b5b7842b68daeb48 | PatchThird Party Advisory |
| https://huntr.dev/bounties/4fb42144-ac70-4f76-a5e1-ef6b5e55dc0d | ExploitPatchThird Party Advisory |
| https://github.com/go-gitea/gitea/commit/e3d8e92bdc67562783de9a76b5b7842b68daeb48 | PatchThird Party Advisory |
| https://huntr.dev/bounties/4fb42144-ac70-4f76-a5e1-ef6b5e55dc0d | ExploitPatchThird Party Advisory |
Track CVE-2022-1058 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2022-1058), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.