Skip to main content
Unpatched Gogs RCE: What Happened and What Your Team Should DoIncident
3 min readFor Security Engineers

Unpatched Gogs RCE: What Happened and What Your Team Should Do

What Happened

A zero-day remote code execution (RCE) vulnerability in Gogs allows authenticated users to execute arbitrary commands on servers running versions 0.14.2 and 0.15.0+dev. Security researcher Jonah Burgess reported the flaw to Gogs maintainers on March 17, 2025, but no patch has been released. The vulnerability affects all default-configured Gogs instances, and approximately 2,400 servers remain exposed online, primarily in Asia and Europe.

The exploit requires authentication, but default Gogs installations allow open user registration. This means any attacker can create an account and gain the access needed to exploit the RCE.

Timeline

  • March 17, 2025: Jonah Burgess reports the vulnerability to Gogs maintainers.
  • Date unknown: Vulnerability details become public while servers remain unpatched.
  • Current status: No patch available; 2,400 servers confirmed exposed.

This timeline highlights the extended period between disclosure and remediation. If you're running Gogs, you're operating in a known-vulnerable state with no vendor fix available.

Which Controls Failed or Were Missing

The failure involves both vendor response and deployment configuration:

  • Patch management breakdown: The vendor hasn't provided a fix despite responsible disclosure. There's nothing to deploy.
  • Default configuration accepted without hardening: Open registration is enabled by default. Most teams deploy Gogs, verify Git operations, and move on without questioning account creation permissions.
  • Authentication treated as sufficient access control: The vulnerability requires authentication, but this is trivial to obtain with open registration. Authentication should not equate to a trusted user.
  • Lack of compensating controls: Without network segmentation, egress filtering, or runtime monitoring around your Gogs instance, you lack a secondary defense layer when patching fails.

What the Relevant Standards Require

PCI DSS v4.0.1 Requirement 6.3.3 mandates addressing security vulnerabilities based on a defined risk ranking. For an RCE flaw in a system handling sensitive data, this requires immediate action.

NIST 800-53 Rev 5 SI-2 (Flaw Remediation) requires remediation within defined time periods and automated mechanisms to track system components' flaw remediation status. Ensure your vulnerability scanner tracks self-hosted Git instances.

ISO/IEC 27001:2022 Control 8.8 requires obtaining timely information about vulnerabilities and taking appropriate measures. Waiting for a vendor patch isn't viable when fixes aren't forthcoming.

OWASP ASVS v4.0.3 Section 14.2 (Dependency) requires up-to-date components, and if updates don't exist, a process for monitoring and applying security updates, including contingency plans.

Lessons and Action Items for Your Team

Immediate actions if you run Gogs:

  • Disable user registration in your app.ini configuration file. Set DISABLE_REGISTRATION = true under the [service] section to remove the trivial authentication path. Manually create accounts if needed.
  • Restrict network access to your Gogs instance. Move it behind a VPN or restrict access to known IP ranges using your firewall or cloud security groups.
  • Review existing user accounts. Delete unrecognized or inactive accounts. An attacker may have created accounts in preparation.
  • Enable audit logging. Set LOG_SQL = true to track database operations for visibility into authenticated user actions.

Broader lessons for self-hosted services:

  • Inventory your self-hosted applications. Without a complete list of services like Gogs, GitLab, Jenkins, and others, you can't assess exposure when vulnerabilities emerge.
  • Treat default configurations as insecure. Disable unnecessary features upon deployment, such as open registration and default admin credentials.
  • Assess vendor response in tooling decisions. Before adopting a tool, evaluate the maintainer's patching speed and project activity. If relying on a single-maintainer project, implement compensating controls from the start.
  • Implement runtime application self-protection (RASP) or egress filtering for high-risk services. Limit the potential damage if an attacker gains RCE on your server.

The Gogs situation tests your vulnerability management program. When the vendor doesn't patch, can your team still reduce risk? If you're waiting for an update, you're not managing vulnerabilities—you're hoping they don't get exploited first.

Remote Code Execution

Topics:Incident

You Might Also Like