CVE-2024-55947 Gogs has a Path Traversal in file update API

High 8.7 Published Updated

A malicious user can write files to arbitrary paths to gain SSH access, requiring an upgrade to the latest version.

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-2024-55947?

CVE-2024-55947 is a high-severity path traversal vulnerability in gogs, published on 23 Dec 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Gogs is an open source self-hosted Git service. A malicious user is able to write a file to an arbitrary path on the server to gain SSH access to the server. The vulnerability is fixed in 0.13.1.

Weakness: CWE-22

Which versions are affected by CVE-2024-55947?

3 open source packages ship an affected version, including gogs.io/gogs. It affects 1 product.

PackageAffectedFixed in
gogs.io/gogs GoAll versions0.13.1
gogs.io/gogs GoAll versions0.13.1
gogs.io/gogs GoAll versions0.13.1

Products include Gogs Gogs.

How do I fix CVE-2024-55947?

Upgrade gogs.io/gogs to 0.13.1 or later.

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

Is CVE-2024-55947 being exploited?

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

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-qf5v-rp47-55gg, GO-2024-3356.

Is CVE-2024-55947 in your software?

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

Check your SBOMs for free