CISA Warns of Active Exploitation of Gogs Vulnerability Allowing Code Execution

CISA Alerts on Active Exploitation of Gogs Vulnerability Leading to Code Execution

The U.S. Cybersecurity and Infrastructure Security Agency (CISA) has recently issued a warning regarding the active exploitation of a significant security flaw in Gogs, a popular self-hosted Git service. This vulnerability, identified as CVE-2025-8110 with a CVSS score of 8.7, involves a path traversal issue within the repository file editor, potentially allowing unauthorized code execution.

Gogs is widely utilized for its lightweight and user-friendly interface, enabling individuals and organizations to host Git repositories on their own servers. However, this newfound vulnerability poses a substantial risk to the integrity and security of these repositories.

Understanding the Vulnerability

The core of CVE-2025-8110 lies in improper handling of symbolic links within the PutContents API of Gogs. Attackers can exploit this flaw by creating a Git repository that includes a symbolic link pointing to a sensitive file outside the repository’s directory. By committing this symbolic link and subsequently using the PutContents API to write data to it, the operating system is tricked into following the symlink and overwriting the target file.

This method can be particularly dangerous as it allows attackers to overwrite critical configuration files, such as the Git configuration’s `sshCommand` setting. By manipulating this setting, an attacker can execute arbitrary commands on the server, effectively gaining control over the system.

Discovery and Exploitation

The vulnerability was brought to light by cybersecurity firm Wiz, which observed its exploitation in zero-day attacks. Their research indicated that approximately 700 Gogs instances had been compromised through this method. Further data from the attack surface management platform Censys revealed around 1,600 internet-exposed Gogs servers, with the majority located in China (991), followed by the United States (146), Germany (98), Hong Kong (56), and Russia (49).

Current Status and Mitigation

As of now, there are no official patches available to address CVE-2025-8110. However, the Gogs development community has been proactive, with pull requests on GitHub indicating that necessary code changes have been made. One of the project maintainers mentioned that once the updated image is built on the main branch, both `gogs/gogs:latest` and `gogs/gogs:next-latest` will include the fix for this vulnerability.

In the interim, CISA recommends that Gogs users take the following precautionary measures:

– Disable Open Registration: Prevent unauthorized users from creating accounts by turning off the default open-registration setting.

– Restrict Server Access: Limit access to the Gogs server by implementing a Virtual Private Network (VPN) or establishing an allow-list to control which IP addresses can connect.

Federal Civilian Executive Branch (FCEB) agencies have been directed to apply these mitigations by February 2, 2026, to safeguard their networks against potential threats.

Broader Implications

This incident underscores the critical importance of regular software updates and vigilant monitoring of self-hosted services. Path traversal vulnerabilities, like CVE-2025-8110, can have far-reaching consequences, including unauthorized access, data breaches, and system compromises.

Organizations utilizing Gogs or similar platforms should prioritize the following actions:

1. Regularly Monitor Security Advisories: Stay informed about vulnerabilities and patches related to the software in use.

2. Implement Access Controls: Ensure that only authorized personnel have access to critical systems and repositories.

3. Conduct Security Audits: Periodically review system configurations and logs to detect any unusual activities or potential breaches.

4. Educate Users: Provide training on security best practices to all users interacting with the system.

By adopting these proactive measures, organizations can enhance their security posture and mitigate the risks associated with such vulnerabilities.

Conclusion

The active exploitation of CVE-2025-8110 in Gogs serves as a stark reminder of the ever-present threats in the cybersecurity landscape. While the development community is working diligently to release a patch, users must take immediate steps to protect their systems. By disabling open registration, restricting server access, and staying informed about security updates, organizations can reduce their exposure to potential attacks.

As cyber threats continue to evolve, maintaining a proactive and informed approach to security is essential for safeguarding digital assets and maintaining trust in self-hosted services.