Skip to main content

Gogs CVE-2026-47267

| EUVDEUVD-2026-39064 HIGH
Server-Side Request Forgery (SSRF) (CWE-918)
2026-06-22 https://github.com/gogs/gogs GHSA-c4v7-xg93-qf8g
8.3
CVSS 3.1 · Vendor: https://github.com/gogs/gogs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate and gain webhook config rights
  2. Delivery
    Point webhook at attacker-controlled host
  3. Exploit
    Trigger test/event delivery
  4. Execution
    Host returns 301 to 169.254.169.254
  5. Persist
    Client follows redirect to internal metadata
  6. Impact
    Exfiltrate cloud credentials/internal data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires the ability to create or test a webhook in Gogs ≤ 0.14.2 (typically a repository-admin authenticated account) and an attacker-controlled HTTP endpoint that returns a 3xx redirect to an internal address such as http://169.254.169.254/. The redirect-following behavior of the webhook delivery client is the enabling feature - the initially configured URL passes local-CIDR validation while the redirect target does not. Exploitation is limited by: needing webhook-configuration privileges (not truly anonymous despite CVSS PR:N), the target server having reachable internal/metadata endpoints (e.g., a cloud-hosted instance exposing 169.254.169.254), and the instance running a version prior to 0.14.3.

Impact

The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L, 8.3 High) reflects network reachability, low complexity, scope change (the SSRF lets the app act against other systems), and limited C/I/A. However, PR:N conflicts with the actual workflow: creating or editing a webhook in Gogs requires an authenticated account with admin rights on a repository, so real-world exploitation needs at least a low-privileged authenticated foothold - verify with vendor; treat PR:N with caution. A working PoC is documented, raising practical risk, but there is no CISA KEV listing and no EPSS score in the input, so there is no evidence of widespread automated exploitation. Net assessment: a genuine, high-value SSRF (cloud-metadata theft can lead to credential compromise) but gated behind webhook-configuration privileges, making it a real priority for any internet-exposed Gogs instance that allows untrusted users to create repositories/webhooks, rather than an unauthenticated mass-exploitation threat.

Exploit ScenarioDerived

An authenticated Gogs user with webhook-configuration rights sets a webhook to an attacker-controlled external host and triggers a test delivery; that host responds with HTTP 301 redirecting to http://169.254.169.254/metadata/v1.json, which the pre-0.14.3 client follows, returning cloud-instance metadata (e.g., DigitalOcean droplet config) to the attacker. With low attack complexity (AC:L) and a documented PoC, the attacker can harvest internal service responses or cloud credentials and pivot further into the environment.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jun 24, 2026

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.

Earlier versions of this analysis (2)
v2 Jun 24, 2026 - 21:32 cvss changed CVSS 8.3

Server-side request forgery in Gogs self-hosted Git service (versions <= 0.14.2) allows an authenticated user who can configure repository webhooks to reach internal-network and cloud-metadata endpoints. Although CVE-2022-1285 blocked webhook URLs whose hostname resolves into local CIDRs, the webhook HTTP client still followed 3xx redirects, so a user-controlled external server can 301-redirect the delivery to http://169.254.169.254/ and exfiltrate cloud instance metadata. A working proof-of-concept is published in the GHSA advisory (publicly available exploit code exists); not listed in CISA KEV and no EPSS provided.

v1 Jun 22, 2026 - 23:16

Server-Side Request Forgery in Gogs (self-hosted Git service, versions ≤ 0.14.2) allows authenticated users to bypass the CVE-2022-1285 local CIDR blocklist by exploiting HTTP redirect following in webhook delivery. Although the prior fix blocked webhook URLs whose initial hostname resolved to internal addresses, the HTTP client continued following 301/302 redirects to destinations such as the cloud Instance Metadata Service (169.254.169.254), entirely bypassing the allowlist check. A publicly available proof-of-concept included in the advisory demonstrates successful extraction of DigitalOcean droplet metadata including hostname, SSH info, and cloud-config data; no CISA KEV listing or EPSS score is recorded at time of analysis.

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.

Affected VersionsENISA

gogs < 0.14.3

Affected Packages

go gogs.io/gogs fix: 0.14.3
euvd gogs fix: 0.14.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/gogs/gogs) PRIMARY 8.3 HIGH
AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
vuln.today AI 8.5 HIGH

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.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:L/SI:N/SA:N
SUSE HIGH

Primary rating from Vendor (https://github.com/gogs/gogs).

CVSS VectorVendor: https://github.com/gogs/gogs

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
Low

Lifecycle Timeline

3
Analysis Updated
Jun 24, 2026 - 21:33 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 24, 2026 - 21:32 vuln.today
v2 - CVSS changed
CVSS changed
Jun 24, 2026 - 21:22 NVD
8.3 (HIGH)

DescriptionCVE.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: close

It is possible to access 169.254.169.254

PoC

  1. Run netcat on any server
  2. Use this server as the webhook URL
  3. 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

Executive ViewAI

Why It Matters

Gogs (self-hosted Git service) versions ≤0.14.2 contain a server-side request forgery vulnerability that bypasses previous SSRF defenses through HTTP redirect abuse, allowing users with webhook configuration permissions to access internal networks and cloud metadata endpoints. Publicly available exploit code exists; organizations running affected versions face direct exposure of infrastructure credentials and internal services to authorized application users.

Business Impact: High
Compensating Controls

Patch available per vendor advisory. Interim mitigations: restrict webhook configuration access to trusted administrators; implement network-level egress filtering to block internal IP ranges and 169.254.169.0/24; disable redirect following in webhook delivery if supported; monitor webhook configuration changes.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Prevalence
Medium
popular self-hosted Git service but niche versus GitHub/GitLab
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

Vendor 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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy