CVE-2025-68942 Gitea allows XSS because the search input box (for creating tags and branches) is v-html instead of v-text
Attackers can execute arbitrary scripts via the tag and branch search input due to unsafe HTML rendering, potentially compromising user accounts.
- 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-68942?
CVE-2025-68942 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
Gitea before 1.22.2 allows XSS because the search input box (for creating tags and branches) is v-html instead of v-text.
Weakness: CWE-79
Which versions are affected by CVE-2025-68942?
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.22.2 |
code.gitea.io/gitea Go | All versions | 1.22.2 |
code.gitea.io/gitea Go | All versions | 1.22.2 |
gitea Bitnami | All versions | 1.22.2 |
Products include Gitea Gitea.
How do I fix CVE-2025-68942?
Upgrade code.gitea.io/gitea to 1.22.2 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-68942 being exploited?
There is no known exploitation of CVE-2025-68942 in the wild and no public exploit code.
Other vulnerabilities in Gitea Gitea
Sources
Also known as BIT-gitea-2025-68942, GHSA-898p-hh3p-hf9r, GO-2025-4263.