HIGH 8.3

CVE-2026-47267: Gogs Webhook SSRF Vulnerability – Bypass of Local Network Protection

Gogs, a self-hosted Git service, contains a vulnerability that allows attackers to bypass webhook security controls. While the earlier CVE-2022-1285 fix prevents direct connections to internal network addresses, it does not block webhook requests that follow HTTP redirects to those same internal addresses. An attacker can craft a webhook URL pointing to an external server that redirects to an internal system, giving them potential access to sensitive resources within your private network. This flaw has been patched in Gogs version 0.14.3.

Source data · NVD / CISA · public domain

CVSS
3.1 · 8.3 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
Weaknesses (CWE)
CWE-918
Affected products
0 configuration(s)
Published / Modified
2026-06-24 / 2026-06-25

NVD description (verbatim)

Gogs is an open source self-hosted Git service. Prior to 0.14.3, the fix for CVE-2022-1285 prevents adding webooks or running webhooks with URLs with a hostname that resolves in localCIDRs. However, webhooks still follow redirects allowing to access hostname inside localCIDRs. This vulnerability is fixed in 0.14.3.

4 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-47267 is a Server-Side Request Forgery (SSRF) variant affecting Gogs webhooks. The vulnerability exists because the webhook validation logic, implemented to remediate CVE-2022-1285, fails to prevent attacks that leverage HTTP redirect responses. When a webhook is configured with a URL to an attacker-controlled external domain, that domain can return a redirect (HTTP 301/302/307) pointing to an internal hostname within private CIDR ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, etc.). The Gogs webhook client follows this redirect, bypassing hostname-based restrictions and enabling access to internal services. This is classified as CWE-918 (Server-Side Request Forgery), a fundamental control-plane security weakness.

Business impact

Organizations running Gogs prior to 0.14.3 face exposure of internal resources and data through webhook abuse. An attacker with repository access or the ability to influence webhook configuration can probe internal infrastructure, access metadata endpoints, exfiltrate secrets from internal services, or trigger denial-of-service conditions on backend systems. This is particularly dangerous in environments where Gogs interacts with CI/CD pipelines, internal APIs, or monitoring systems. The impact escalates in multi-tenant scenarios where untrusted users can create repositories.

Affected systems

Gogs versions prior to 0.14.3 are affected. The vulnerability requires network connectivity from the Gogs service to the internet (for initial outbound connection to the redirect source) and assumes the Gogs instance has network access to internal resources on private CIDR ranges. Self-hosted deployments are the primary concern, particularly those integrated with internal toolchains or operating on shared infrastructure.

Exploitability

Exploitability is moderate to high. The attack requires no privileges beyond repository access or webhook creation permissions; many Gogs deployments grant these to untrusted users. The attacker control surface is large—any external URL can be registered as a webhook. No user interaction is required. However, successful exploitation depends on network topology: the Gogs service must have east-west connectivity to internal targets, which is not universal across all deployments. The attack is straightforward to execute once webhook access is obtained.

Remediation

Upgrade Gogs to version 0.14.3 or later, which implements strict redirect handling for webhook URLs. After patching, verify webhook configurations do not point to known attacker-controlled domains. Review webhook logs for suspicious redirect patterns or unusual internal service access attempts. In environments unable to patch immediately, restrict webhook creation to trusted administrators, disable webhooks entirely if unused, and implement network segmentation to limit Gogs outbound access to necessary external services only.

Patch guidance

Verify the installed Gogs version by checking the Admin Dashboard or running `gogs --version`. If running a version prior to 0.14.3, download and deploy the patched version from the official Gogs repository. Test the upgrade in a non-production environment first, as webhook behavior may change. Restart the Gogs service to apply the patch. No database migrations are typically required for patch-level updates, but confirm compatibility with your deployment method (Docker, binary, or source).

Detection guidance

Review webhook configuration logs for URLs that include redirect chains or external domains. Analyze Gogs access logs for HTTP requests with Location/redirect headers pointing to private CIDR ranges. Monitor outbound connections from the Gogs service for unexpected internal IP targets. Look for webhook creation or modification events by non-administrator accounts. Implement webhook execution logging if not already enabled, and flag any webhook runs that result in HTTP 301/302/307 responses. Network-level detection can identify unusual outbound traffic from Gogs to internal services.

Why prioritize this

While not yet listed on CISA's Known Exploited Vulnerabilities catalog, this vulnerability merits urgent patching due to its high CVSS score (8.3), zero privilege requirements, and direct impact on infrastructure security boundaries. The bypass of previous security controls (CVE-2022-1285 fix) demonstrates active attacker interest in Gogs SSRF vectors. Organizations with public-facing Gogs instances or multi-tenant deployments should prioritize this immediately; single-user, air-gapped instances face lower risk.

Risk score, explained

The CVSS 3.1 score of 8.3 (HIGH) reflects attack vector: network (AV:N), attack complexity: low (AC:L), and no privilege requirement (PR:N). The impact spans confidentiality, integrity, and availability (C:L/I:L/A:L), as successful exploitation enables information disclosure, manipulation of internal services, and potential DoS. The scope is changed (S:C), meaning the vulnerability can impact resources beyond the vulnerable component itself. This scoring appropriately captures the cross-network security boundary violation.

Frequently asked questions

Does this affect Gogs instances that don't use webhooks?

No. If webhooks are disabled or unused, this vulnerability poses no direct risk. However, we recommend upgrading regardless, as future features or accidental webhook enablement could expose the system.

Can we just block outbound redirects at the firewall?

Partially. Network-level redirect blocking can provide defense-in-depth, but it is not a substitute for patching. Firewall rules are difficult to maintain and can be complex in dynamic environments. The proper fix is to upgrade Gogs.

What should we do about existing webhook URLs we've configured?

After upgrading to 0.14.3, review all webhook URLs to ensure they are legitimate and do not include untrusted external domains. If webhooks are managed by untrusted users, consider implementing approval workflows or restricting webhook creation to administrators only.

Is this vulnerability exploitable without network access to internal resources?

The exploit requires the Gogs service to have network connectivity to both the attacker's redirect server and the internal target. If Gogs is deployed in a network segment with no access to internal infrastructure, the practical impact is reduced, though upgrade is still recommended.

This analysis is provided for informational purposes and reflects information available as of the publication date. Exploit code, proof-of-concept details, and weaponized tooling are not provided. Organizations should verify patch availability and compatibility with their specific deployment before applying updates. Network topology, access controls, and deployment context vary; risk assessment should be tailored to your environment. SEC.co makes no guarantee regarding the completeness or timeliness of this analysis. Consult official Gogs documentation and advisories for authoritative guidance. Source: NVD (public-domain), retrieved 2026-08-02. Analysis generated by SEC.co (claude-haiku-4-5).