CVE-2026-25120

Gogs Allows Cross-Repository Comment Deletion via DeleteComment

Published Feb 19, 2026 CVSS 4.0 · 5.1 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The flaw in Gogs allows a repository administrator to delete comments that belong to other repositories through the DeleteComment API. The API fails to validate that the comment ID belongs to the repository indicated in the request URL, enabling an authorized user to remove any comment in the system by providing an arbitrary ID. This results in loss of audit trail and potential removal of evidence or legitimate user feedback, and is a classic missing access control (CWE‑639).

Affected Systems

The affected product is Gogs, the self‑hosted Git service developed by gogs, in all released versions 0.13.4 and earlier. The issue was resolved in version 0.14.0, so any deployment running the older release is vulnerable.

Risk and Exploitability

The CVSS score of 5.1 indicates a moderate impact, and the EPSS value of less than 1% shows a very low probability of exploitation. The vulnerability is not listed in the CISA KEV catalog, meaning no publicly known exploit has been reported. Attackers would need to be repository administrators on a Gogs instance and must know or discover an unrelated comment ID; the attack is performed via a standard HTTP API call, so it can be executed by a remote party that has administrative credentials.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the vendor–provided fix by upgrading to Gogs version 0.14.0 or newer.
  • Confirm that no instances of the vulnerable versions are running; consider performing a system‑wide inventory of Gogs installations.
  • Review existing permissions and restrict the DeleteComment functionality to users who require it; in environments where upgrading is not yet possible, consider securing the API endpoint with additional authentication or IP filtering to limit exposure.

Generated by OpenCVE AI on April 17, 2026 at 18:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-jj5m-h57j-5gv7 Gogs Allows Cross-Repository Comment Deletion via DeleteComment
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
CPEs cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*
Metrics cvssV3_1

{'score': 2.7, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N'}

Type Values Removed Values Added
First Time appeared Gogs
Gogs gogs
Vendors & Products Gogs
Gogs gogs
Type Values Removed Values Added
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.
Title Gogs Allows Cross-Repository Comment Deletion via DeleteComment
Weaknesses CWE-639
References
Metrics cvssV4_0

{'score': 5.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-639

    Authorization Bypass Through User-Controlled Key

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 19, 2026, 5:45 PM
Reserved
Jan 29, 2026, 2:03 PM
Status
Analyzed
Published
Feb 19, 2026, 7:17 AM
Modified
Jun 17, 2026, 10:24 AM