Get a Demo
Under Attack?
Critical Security Alert: Unpatched Gogs RCE
CVE-2025-8110: Unpatched Gogs RCE Vulnerability Actively Exploited in the Wild

CVE-2025-8110: Unpatched Gogs RCE Vulnerability Actively Exploited in the Wild

<br />
<b>Warning</b>:  Undefined variable $photo in <b>/nas/content/live/landing173/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code</b> on line <b>24</b><br />
<br />
<b>Warning</b>:  Trying to access array offset on value of type null in <b>/nas/content/live/landing173/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code</b> on line <b>24</b><br />
Yuval Elarat December 11, 2025

Executive Summary

CVE-2025-8110 is an actively exploited, unpatched Remote Code Execution (RCE) vulnerability affecting all Gogs versions ≤ 0.13.3. The flaw allows authenticated users to bypass path-traversal protections through a symlink-based file-write bypass, enabling arbitrary file overwrite on the host server and ultimately full system compromise. With no official patch available and exploitation occurring in the wild, all self-hosted Gogs instances should be considered at risk and require immediate mitigation.

This vulnerability is effectively a bypass of a fix for a previous issue (CVE-2024-55947).

Earlier this year, Gogs patched a vulnerability where attackers used “dot-dot” traversal (../) in file paths to escape the repository directory. The maintainers added validation to block malicious file names. However, CVE-2025-8110 sidesteps this check entirely.

Instead of manipulating the filename, attackers manipulate the file type.

How the Bypass Works

The flaw lies in the discrepancy between how Gogs validates a path and how the Operating System (OS) writes to it.

  1. Validation: The Gogs API checks the requested filename (e.g., config). It sees a valid name inside the repository and approves it.
  2. Execution: When the API writes data to that filename, it does not check if the file is a symbolic link.
  3. The Jump: If the file is a symlink pointing outside the repository (e.g., to /home/git/.ssh), the OS follows the link and overwrites the external target.

The Attack Chain

The exploitation requires low-privilege access (often available via default “Open Registration”) and follows a simple four-step process:

  1. Preparation: The attacker creates a standard Git repository.
  2. Injection: The attacker commits a symbolic link to the repository. This link points to a sensitive system file (e.g., .git/config or authorized_keys).
  3. Trigger: The attacker uses the PutContents API to write malicious payloads to the symlink. Gogs approves the write because the filename looks safe.
  4. RCE: The payload overwrites the target file. By targeting the repository’s .git/config, attackers inject a core.sshCommand, forcing the server to execute their code during the next Git operation.

Note on Scope: This affects Gogs versions ≤ 0.13.3. Since no patch exists, all current versions are potentially vulnerable.

Signs of Compromise

Recent “smash-and-grab” campaigns suggest automated exploitation. Check your instance for:

  • Suspicious Repositories: New repos created with random, 8-character alphanumeric names.
  • Unknown Processes: Unexpected shell commands or outbound network connections from the Gogs service user.
  • Modified Configs: unauthorized changes to .git/config files within repositories or system-level SSH keys.

Immediate Mitigation Strategies

Since you cannot upgrade to a patched version yet, you must reduce the attack surface.

1. Disable Open Registration

This is the most effective immediate stop-gap. If attackers cannot create an account, they cannot create the repository needed to launch the exploit.

2. Network Isolation

Gogs should never be exposed directly to the public internet.

  • Place the instance behind a VPN or a strict firewall allow-list.
  • If public access is required, place it behind an authentication proxy to prevent unauthorized API access.

Runtime Protection with Upwind

When software remains unpatched, runtime visibility is your last line of defense. Upwind helps secure vulnerable Gogs instances by:

  • Mapping Vulnerable Assets: Instantly identifying all running Gogs instances and mapping their exposure level.
  • Detecting Exploitation Attempts: Monitoring for the specific behavioral patterns of the symlink exploit (e.g., unexpected file writes outside the repo path).
  • Identifying Post-Exploitation Activity: Flagging the execution of suspicious child processes and communication with known C2 IPs.

Protect your infrastructure even when the code is vulnerable. For support or to check your exposure, contact [email protected].

Contents

Further Reading

The Risk Isn't What You Prompt, It's What You Built.

The Risk Isn’t What You Prompt, It’s What You Built

Key Takeaways: Agentic AI security is an architecture problem, not a policy problem. Most organizations have adopted AI agents in the form of coding assistants, autonomous workflow tools, internal chatbots connected to production systems, but without establishing the foundational security frameworks those systems require. The adoption pressure is real. Telling your engineering team to stop…
Upwind is a Visionary Leader in Frost & Sullivan report

Upwind Named a Strong Visionary Leader in Frost & Sullivan’s 2026 Cloud/Application Runtime Security Radar

We're excited to share that Frost & Sullivan has recognized Upwind as a Strong Visionary Leader in the Frost Radar™: Cloud/Application Runtime Security, 2026. This recognition highlights the company's innovation, growth, and leadership in the emerging Cloud-Native Application Detection and Response (CNADR) market. For us, the recognition is meaningful not simply because of where Upwind…
API Custom Threat Detection

Upwind brings Custom Detection Policies for APIs

Every API has a different risk profile. An internal billing endpoint and a public-facing authorization endpoint don't fail the same way. They don't get attacked the same way either. A generic ruleset can't account for that. Custom rules can, and now those rules can see sensitive data too. This new release brings two things together…
Add the Upwind RSS Feed to Slack
Connect the Upwind RSS Feed to your Slack.
Follow the how-to here.
Main RSS