CVE-2025-68946 Gitea vulnerable to Cross-site Scripting
Attackers can inject JavaScript via forbidden URL schemes in links, potentially executing code or stealing sessions in Gitea.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-68946?
CVE-2025-68946 is a medium-severity cross-site scripting vulnerability in Gitea Gitea, published on 26 Dec 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
In Gitea before 1.20.1, a forbidden URL scheme such as javascript: can be used for a link, aka XSS.
Weakness: CWE-79
Which versions are affected by CVE-2025-68946?
4 open source packages ship an affected version, including code.gitea.io/gitea and gitea. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
code.gitea.io/gitea Go | All versions | 1.20.1 |
code.gitea.io/gitea Go | All versions | 1.20.1 |
code.gitea.io/gitea Go | All versions | 1.20.1 |
gitea Bitnami | All versions | 1.20.1 |
Products include Gitea Gitea.
How do I fix CVE-2025-68946?
Upgrade code.gitea.io/gitea to 1.20.1 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-2025-68946 being exploited?
There is no known exploitation of CVE-2025-68946 in the wild and no public exploit code.
Other vulnerabilities in Gitea Gitea
Sources
Also known as BIT-gitea-2025-68946, GHSA-hq57-c72x-4774, GO-2025-4265.