CVE-2024-56731CWE-552

Gogs deletion of internal files allows remote command execution

Critical · published June 24, 2025

CVSS v3.1
10.0
EPSS
1%
Percentile
66.6
In the wild
Unconfirmed
What it is

🚨 Before version 0.13.3, Gogs users were just a command away from big trouble! An insufficient patch from CVE-2024-39931 allows unprivileged accounts to delete crucial files and execute commands on the server. 🔥 Think of it like a restaurant where the kitchen staff can sneak into the pantry and tamper with any ingredient, potentially ruining every dish served. In this case, unprivileged users can mess with the .git directory, endangering everyone's code! This oversight means an attacker could run arbitrary commands with the account's privileges specified by RUN_USER, leading to unauthorized access to sensitive data and even code modifications on the Gogs instance. If exploited, this flaw could compromise the integrity of all user projects hosted on that server – a recipe for chaos!

Put simply

Think of it like a restaurant where the kitchen staff can sneak into the pantry and tamper with any ingredient, potentially ruining every dish served. In this case, unprivileged users can mess with the .git directory, endangering everyone's code! The vulnerability arises from an insufficient patch that allows file deletion and remote command execution for unprivileged users, leveraging the permissions of the RUN_USER configuration. This can lead to a complete compromise of the application and the projects it hosts.

What to do

This oversight means an attacker could run arbitrary commands with the account's privileges specified by RUN_USER, leading to unauthorized access to sensitive data and even code modifications on the Gogs instance. If exploited, this flaw could compromise the integrity of all user projects hosted on that server – a recipe for chaos! To secure your Gogs instance, upgrade to version 0.13.3 immediately. It's essential to review your user permissions and ensure that only trusted accounts have adequate access to the .git directory. Conduct a security audit to check for any unauthorized changes. You've got this! With these steps, you can safeguard your Gogs setup and keep your projects secure! 🛡️

The record
Technical detail
CVSS v3.1
10.0 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01150 · 66.6th percentile
Weakness
CWE-552 · Files or Directories Accessible to External Parties
Published
2025-06-24T03:37Z
EPSS history
Timeline
  • 24 JUN 03:37Z
    Gogs deletion of internal files allows remote command execution
    cvelistv5