Overview
The U.S. Cybersecurity and Infrastructure Security Agency (CISA) has officially listed a critical remote code execution (RCE) vulnerability in the popular self-hosted Git service Gogs as a Known Exploited Vulnerability (KEV). The flaw, identified as CVE-2025-8110, enables unauthenticated threat actors to execute arbitrary commands on the host running Gogs by abusing a pathâtraversal issue in the PutContents API. With no vendorâissued patch available, organizations must act now to contain the risk.
Technical Details
CVE-2025-8110 (CVSS 8.7) is a classic case of improper symbolicâlink handling combined with insufficient path sanitisation. The attack chain works as follows:
- Step 1 - Repository Creation: The attacker creates a new Git repository on the vulnerable Gogs instance.
- Step 2 - Symlink Injection: Within that repository, the attacker commits a symbolic link (
symlink) that points to a sensitive file outside the repository, such as/etc/gitconfigor/root/.ssh/authorized_keys. - Step 3 - PutContents Abuse: Using the
PUT /api/v1/repos/:owner/:repo/contents/:path(PutContents) endpoint, the attacker writes arbitrary data to the path that resolves to the symlink. The Gogs backend follows the symlink and writes directly to the target file on the host filesystem. - Step 4 - Code Execution: By overwriting configuration filesâmost notably the
sshCommandsetting ingitconfigâthe attacker injects a malicious command that executes with the privileges of the Gogs process (oftenrootor a privileged service account). This grants full remote code execution on the host.
Wizâs research indicates that the exploit bypasses mitigations introduced for the earlier CVE-2024-55947, effectively turning a previously mitigated pathâtraversal into a fullâblown RCE vector.
Impact Analysis
The vulnerability primarily affects:
- Selfâhosted Gogs deployments â onâpremises servers, cloud VMs, or containerised environments.
- CI/CD pipelines that rely on Gogs for source control, webhooks, or automated builds.
- Development teams that expose Gogs to the internet without strict access controls.
According to Censys data, over 1,600 internetâexposed Gogs instances exist, with the largest concentrations in China (991), the United States (146), Germany (98), Hong Kong (56), and Russia (49). Wiz has already observed exploitation against roughly 700 instances, confirming that threat actors are actively weaponising the flaw.
Potential consequences include:
- Full system compromise, enabling data exfiltration, ransomware deployment, or lateral movement.
- Supplyâchain attacks: compromised source code can be silently altered, inserting backdoors into downstream applications.
- Loss of integrity for internal developer workflows and loss of confidence in the organizationâs DevSecOps posture.
Timeline of Events
- Late 2025 â Initial discovery of the pathâtraversal weakness in the PutContents API (CVE-2025-8110).
- Early January 2026 â Wiz reports active exploitation in the wild; zeroâday attacks observed.
- January 13, 2026 â CISA publishes an advisory and adds CVE-2025-8110 to the KEV catalog.
- MidâJanuary 2026 â Gogs maintainers merge a pullârequest fixing the symlink handling; images will be updated in upcoming releases.
- February 2, 2026 â Federal Civilian Executive Branch agencies required to implement mitigations.
Mitigation & Recommendations
Because an official patch is not yet released, organisations must apply defenceâinâdepth controls:
- Network Segmentation: Isolate Gogs servers from the internet. Use VPNs or bastion hosts and enforce strict allowâlists for API access.
- Web Application Firewall (WAF) Rules: Block or scrutinise requests to the
/api/v1/repos/*/contents/*endpoint from unauthenticated sources. Consider rateâlimiting and payload inspection for suspicious..sequences or symlinkârelated patterns. - Disable Open Registration: Turn off the default openâregistration setting to prevent unauthenticated users from creating repositories.
- Restrict File System Permissions: Run Gogs under a nonâprivileged user and ensure critical files (e.g.,
/etc/gitconfig,/root/.ssh/authorized_keys) are not writable by the Gogs process. - Monitor for Indicators of Compromise (IOCs):
- Unexpected creation of repositories containing symbolic links.
- Sudden modifications to
gitconfigor other configuration files. - Outbound connections from the Gogs host to unknown IPs shortly after a repository push.
- Apply Temporary Workâarounds: If feasible, disable the PutContents API entirely or restrict it to authenticated, roleâbased accounts.
- Plan for Patch Deployment: Track the upcoming Gogs image releases (tagged
latestandnextâlatest) that incorporate the fix. Prepare automated rollâout pipelines to minimise exposure time.
RealâWorld Impact
Enterprises that rely on Gogs for internal code hosting are facing a race against time. A successful exploit can give attackers a foothold inside the development environment, a prime target for supplyâchain attacks. For example, a compromised CI/CD runner could inject malicious binaries into production releases, affecting downstream customers and eroding brand trust.
Smallâtoâmedium businesses that expose Gogs publicly without proper hardening are especially vulnerable. The low barrier to exploitationâno authentication requiredâmeans that automated scanners can discover and weaponise vulnerable instances at scale.
Expert Opinion
From a strategic standpoint, CVE-2025-8110 underscores a broader trend: the convergence of sourceâcode management and runtime orchestration creates a highâvalue attack surface. As organisations adopt âGitOpsâ practices, the line between code repository and production environment blurs, making vulnerabilities like this far more dangerous.
My recommendation for the industry is twoâfold:
- Shiftâleft security: Integrate static analysis and policy enforcement directly into the Git platform. Prevent the creation of dangerous symlinks through repositoryâlevel hooks.
- Zeroâtrust networking: Assume that any exposed service can be probed. Enforce strict identityâbased access, mutual TLS, and microâsegmentation for developer tooling.
Until the upstream fix lands, organisations that cannot afford a breach should consider temporarily migrating critical repositories to a hardened alternative (e.g., selfâhosted GitLab with stricter defaults) while keeping Gogs instances isolated.