CVE-2026-25120 Gogs Allows Cross-Repository Comment Deletion via DeleteComment
Repository administrators can delete comments from any other repository by bypassing ownership checks in the DeleteComment API.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-25120?
CVE-2026-25120 is a medium-severity missing authorization vulnerability in gogs, published on 19 Feb 2026. An attacker needs administrator access to exploit it, with no action from the victim.
Official description
Gogs is an open source self-hosted Git service. In versions 0.13.4 and below, the DeleteComment API does not verify that the comment belongs to the repository specified in the URL. This allows a repository administrator to delete comments from any other repository by supplying arbitrary comment IDs, bypassing authorization controls. The DeleteComment function retrieves a comment by ID without verifying repository ownership and the Database function DeleteCommentByID performs no repository validation. This issue has been fixed in version 0.14.0.
Weakness: CWE-639
Which versions are affected by CVE-2026-25120?
3 open source packages ship an affected version, including gogs.io/gogs. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
gogs.io/gogs Go | All versions | None |
gogs.io/gogs Go | All versions | 0.14.0 |
gogs.io/gogs Go | All versions | 0.14.0 |
Products include Gogs Gogs.
How do I fix CVE-2026-25120?
Upgrade gogs.io/gogs to 0.14.0 or later.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2026-25120 being exploited?
There is no known exploitation of CVE-2026-25120 in the wild and no public exploit code.
Other vulnerabilities in gogs
Sources
Also known as GHSA-jj5m-h57j-5gv7, GO-2026-4501.