CVE-2025-68940 Gitea doesn't adequately enforce branch deletion permissions after merging a pull request.
Attackers can delete branches after merging pull requests due to inadequate permission enforcement in Gitea.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-68940?
CVE-2025-68940 is a low-severity missing authorization vulnerability in Gitea Gitea, published on 26 Dec 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
In Gitea before 1.22.5, branch deletion permissions are not adequately enforced after merging a pull request.
Weakness: CWE-863
Which versions are affected by CVE-2025-68940?
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.5 |
code.gitea.io/gitea Go | All versions | 1.22.5 |
code.gitea.io/gitea Go | All versions | 1.22.5 |
gitea Bitnami | All versions | 1.22.5 |
Products include Gitea Gitea.
How do I fix CVE-2025-68940?
Upgrade code.gitea.io/gitea to 1.22.5 or later.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2025-68940 being exploited?
There is no known exploitation of CVE-2025-68940 in the wild and no public exploit code.
Other vulnerabilities in Gitea Gitea
Sources
Also known as BIT-gitea-2025-68940, GHSA-rrcw-5rjv-vj26, GO-2025-4267.