Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
CriticalPublic exploit

RCE in Gogs repository contents update API via .git directory write (insufficient patch for CVE-2024-56731)

IdentifiersCVE-2025-64111CWE-59

In Gogs (open source self-hosted Git service) versions 0.13.3 and earlier, the repository contents update logic (notably the code path invoking the UpdateRepoFile function) can be abused to update files under the repository’s .git directory despite prior hardening for CVE-2024-56731. By bypassing the intended security checks and leveraging path resolution/symlink behavior, an attacker can modify sensitive Git control files such as .git/config via the API. Tampering with .git/config can be used to reach remote command execution on the Gogs server. The issue is described as an insufficient patch of CVE-2024-56731 and is fixed in 0.13.4 and 0.14.0+dev.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Remote command execution on the Gogs server by modifying .git/config (and potentially other .git control files) through the repository contents update API, leading to full system compromise in the context of the Gogs service account and potentially beyond depending on deployment and privileges.

Mitigation

If you can’t patch tonight, do this now.

If immediate upgrade is not possible: restrict or disable the vulnerable repository contents update API endpoint(s) that call UpdateRepoFile; add/enforce server-side validation to prevent writes to any path that resolves into .git (including via symlinks); limit API access to trusted users/networks; and monitor for suspicious attempts to update repository paths that resolve to .git/config or other .git/* targets.

Remediation

Patch, then assume compromise.

Upgrade Gogs (gogs.io/gogs) to 0.13.4 or later (or 0.14.0+dev) where the insufficient patch is corrected and writes resolving into .git are blocked.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
GogsGogsapplication
GogsGogsapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity4

Community discussion across Reddit, Mastodon, and other social sources.