CVE-2026-96594 Gitea repository media API stored XSS
An attacker with push access can store malicious HTML in a repository, leading to stored XSS and potential account takeover when victims view the media file.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-96594?
CVE-2026-96594 is a medium-severity cross-site scripting vulnerability in Gitea Gitea, published on 6 Oct 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-79
Which versions are affected by CVE-2026-96594?
1 open source package ship an affected version, including gitea. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
gitea Bitnami | All versions | 28.1.0 |
Products include Gitea Gitea.
How do I fix CVE-2026-96594?
Upgrade gitea to 28.1.0 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-96594 being exploited?
There is no known exploitation of CVE-2026-96594 in the wild and no public exploit code.
Other vulnerabilities in Gitea Gitea
Sources
Also known as BIT-gitea-2026-96594, GHSA-94rx-fqm6-q23v, MINI-369m-mx6x-g2xg, MINI-p3p7-xwgf-xwjp.