CVE-2026-52813 Gogs: Path Traversal in organization name results in RCE through Git hooks

Critical 10.0 Published Updated

Attackers can exploit path traversal in organization names to overwrite Git hooks, leading to remote code execution on the server.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-52813?

CVE-2026-52813 is a critical path traversal vulnerability in gogs, published on 24 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Gogs is an open source self-hosted Git service. Prior to 0.14.3, organization names containing path traversal sequences (../) are accepted by Gogs, and repositories under them are written to paths following these path traversals. This allows storing/retrieving data for repositories at arbitrary locations on the filesystem. By creating nested structure of Git repositories, one can overwrite the other's hooks configuration to result in Remote Code Execution (RCE). This vulnerability is fixed in 0.14.3.

Weakness: CWE-23

Which versions are affected by CVE-2026-52813?

3 open source packages ship an affected version, including gogs.io/gogs.

PackageAffectedFixed in
gogs.io/gogs GoAll versionsNone
gogs.io/gogs GoAll versions0.14.3
gogs.io/gogs GoAll versions0.14.3

How do I fix CVE-2026-52813?

Upgrade gogs.io/gogs to 0.14.3 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-52813 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-52813 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-c39w-43gm-34h5, GO-2026-5305.

Is CVE-2026-52813 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free