CVE-2019-1010314: Gitea XSS Vulnerability in Repository Description
6.1
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.49477%
CWE
Published
5/24/2022
Updated
4/24/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
code.gitea.io/gitea | go | >= 1.7.2, < 1.7.4 | 1.7.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper HTML sanitization in repository descriptions. The commit diff shows the vulnerable version used descPattern.ReplaceAllStringFunc
with a sanitize
function that wrapped URLs in anchor tags but didn't properly handle all XSS vectors. The patch replaced this with markup.RenderDescriptionHTML
which adds proper link processing and additional sanitization. The key vulnerable function was DescriptionHTML
in models/repo.go
which handled the unsafe rendering before proper security processing was added in the fix.