CVE-2024-39931 Duplicate Advisory: Gogs allows deletion of internal files

Critical 9.9 Published Updated

Attackers can delete internal files in Gogs Git server, potentially compromising repository integrity and availability.

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

CVE-2024-39931 is a critical path traversal vulnerability in n/a, published on 4 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Gogs through 0.13.0 allows deletion of internal files.

Weakness: CWE-552

Which versions are affected by CVE-2024-39931?

5 open source packages ship an affected version, including github.com/gogs/gogs and gogs.io/gogs. It affects 1 product.

PackageAffectedFixed in
github.com/gogs/gogs GoAll versionsNone
github.com/gogs/gogs GoAll versions to 0.13.0None
github.com/gogs/gogs GoAll versions to 0.13.0None
gogs.io/gogs GoAll versions0.13.1
gogs.io/gogs GoAll versions0.13.1

Products include Gogs Gogs.

How do I fix CVE-2024-39931?

Upgrade to a fixed version.

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

Is CVE-2024-39931 being exploited?

There is no known exploitation of CVE-2024-39931 in the wild and no public exploit code.

Sources

Also known as GHSA-2vgj-3pvg-xh4w, GHSA-ccqv-43vm-4f3w, GO-2024-2970.

Is CVE-2024-39931 in your software?

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

Check your SBOMs for free