CVE-2024-54148 Gogs has a Path Traversal in file editing UI

High 8.7 Published Updated

A malicious user can exploit a path traversal vulnerability in the file editing UI to gain SSH access to the server.

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-54148?

CVE-2024-54148 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 commit and edit a crafted symlink file to a repository to gain SSH access to the server. The vulnerability is fixed in 0.13.1.

Weakness: CWE-61, CWE-22

Which versions are affected by CVE-2024-54148?

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-54148?

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-54148 being exploited?

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

Sources

Also known as GHSA-r7j8-5h9c-f6fx, GO-2024-3355.

Is CVE-2024-54148 in your software?

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

Check your SBOMs for free