Gitea repository media API stored XSS
The Gitea API endpoint `GET /api/v1/repos/{owner}/{repo}/media/{filepath}` wrote files of up to 1 KiB that are stored directly in Git, not in LFS, to the response without the content type and disposition headers Gitea uses for user content. An HTML file committed to a repository was therefore rendered by the browser on the Gitea origin. A user who can push to a repository could run JavaScript in the session of a victim who opens the media URL and act with the victim's permissions.
- Products
- gitea
- Affected versions
- Not specified
- Fixed versions
- 28.1.0
- CVEs
- CVE-2026-96594
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 12:06 UTC · Revision 1
Source evidence
The Gitea API endpoint `GET /api/v1/repos/{owner}/{repo}/media/{filepath}` wrote files of up to 1 KiB that are stored directly in Git, not in LFS, to the response without the content type and disposition headers Gitea uses for user content. An HTML file committed to a repository was therefore rendered by the browser on the Gitea origin. A user who can push to a repository could run JavaScript in the session of a victim who opens the media URL and act with the victim's permissions.
osv:BIT-gitea-2026-96594
gitea
Fixed versions: 28.1.0
Complete source record
{
"id": "e58483224476b65d0bb5b9b9bbd07821b333b8765579a4561d8be2ef39d769da",
"url": "https://osv.dev/vulnerability/BIT-gitea-2026-96594",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Gitea repository media API stored XSS",
"summary": "The Gitea API endpoint `GET /api/v1/repos/{owner}/{repo}/media/{filepath}` wrote files of up to 1 KiB that are stored directly in Git, not in LFS, to the response without the content type and disposition headers Gitea uses for user content. An HTML file committed to a repository was therefore rendered by the browser on the Gitea origin. A user who can push to a repository could run JavaScript in the session of a victim who opens the media URL and act with the victim's permissions.",
"evidence": "osv:BIT-gitea-2026-96594",
"products": [
{
"name": {
"value": "gitea",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "28.1.0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "BIT-gitea-2026-96594",
"aliases": [
"BIT-gitea-2026-96594",
"CVE-2026-96594",
"GHSA-94rx-fqm6-q23v"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "28.1.0"
}
]
}
],
"package": {
"name": "gitea",
"purl": "pkg:bitnami/gitea",
"ecosystem": "Bitnami"
},
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
}
],
"database_specific": {
"source": "https://github.com/bitnami/vulndb/tree/main/data/gitea/BIT-gitea-2026-96594.json"
}
}
],
"modified": "2026-10-14T11:10:55.784981843Z",
"provider": "osv",
"references": [
"https://blog.gitea.com/release-of-28.1.0/",
"https://github.com/go-gitea/gitea/pull/39501",
"https://github.com/go-gitea/gitea/pull/39507",
"https://github.com/go-gitea/gitea/releases/tag/v28.1.0",
"https://github.com/go-gitea/gitea/security/advisories/GHSA-94rx-fqm6-q23v",
"https://nvd.nist.gov/vuln/detail/CVE-2026-96594"
],
"provider_metadata": {
"cpes": [
"cpe:2.3:a:gitea:gitea:*:*:*:*:*:*:*:*"
],
"severity": "Medium"
}
},
"related_cves": [
{
"value": "CVE-2026-96594",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/database_specific/severity"
},
"source_id": "core-osv",
"document_id": 316240,
"published_at": "2026-10-14T08:43:17.529+00:00"
}