{"items":[{"id":"NVI-00016012","kind":"vulnerability","title":"Gogs: Overwriting critical files results in a denial of service","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-pm6v-2h4w-4rp2","CVE-2026-52797"],"plain_summary":"GitHub lists this reviewed advisory for gogs.io/gogs. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-037f51a84eca14a6fe4f429744a83626"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-07-21T13:17:31.000Z","value":"8.5 high","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-037f51a84eca14a6fe4f429744a83626"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-037f51a84eca14a6fe4f429744a83626","url":"https://github.com/advisories/GHSA-pm6v-2h4w-4rp2","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-pm6v-2h4w-4rp2","publisher":"GitHub Advisory Database","observed_at":"2026-11-03T22:34:49.300Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-037f51a84eca14a6fe4f429744a83626"],"technology":"gogs.io/gogs","known_exclusions":[],"conditions_summary":"**Vulnerability type:** Path Traversal\n**Impact:** DoS\n**Exploitation prerequisite:** authorized user\n**Description:** As an authorized user, an intruder can dictate the value which is passed to the `git diff` command which, together with bypassing the filtering of the passed value, allows the user to bypass the target directory and write the result of the comparison to any arbitrary path.\n**Researcher:** Artyom Kulakov (Positive Technologies)\n**Mitigation:**\n1. https://github.com/gogs/gogs/blob/b7372b1f32cd0bb40984debfb049e3fc04efaee4/internal/route/repo/editor.go#L307 — on this line, instead of the  `treePath` variable, which comes directly from the user unchanged, we should first filter and then pass the `entry` variable.\n2. To filter the `treePath` variable, it is better to use the preexisting `pathutil.Clean` function instead of `path.Clean` from the standard Go library.\n### Exploitation\nA Positive Technologies researcher discovered that the user has the ability to preview their changes when editing a file in the repository. The `POST /:user/:repo/_preview/:branch/:path_to_file` method is responsible for displaying the changes. The problem is how the `POST /:user/:repo/_previe","public_affected_ranges":["<= 0.13.4"]}],"null_published_at":"2026-11-04T10:04:27.863Z","source_updated_at":"2026-07-21T13:17:31.000Z","source_disclosed_at":"2026-06-16T23:40:04.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-03T22:34:49.300Z"}],"next_cursor":null,"snapshot_revision":"42594"}