CVE-2026-82402

Gogs: Open Redirect in /redirect endpoint via backslash bypass in `IsSameSite`

Published Oct 14, 2026 CVSS 4.0 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
Gogs is an open source self-hosted Git service. Prior to 0.15.0+dev, an unauthenticated attacker can provide a backslash-containing target to the /redirect endpoint, and similar post-action redirect flows are also affected. internal/urlx/urlx.go IsSameSite validates a normalized form of the target while cmd/gogs/internal/web/web.go getRedirect and other callers use the original value in the Location response. This backslash normalization mismatch lets browsers interpret the Location value as a scheme-relative external URL, allowing links on a trusted Gogs domain to redirect victims to attacker-controlled content for phishing. This vulnerability is fixed in 0.15.0+dev.

Analysis

AI-generated

Technical impact

An unauthenticated attacker can supply a backslash-containing URL to the /redirect endpoint in Gogs. Because the IsSameSite function normalizes the target differently than the Location header generation, browsers treat the target as a scheme-relative external address, which results in a redirect to attacker-controlled content. This creates an open-redirect flaw that can be used for phishing or social-engineering attacks. The weakness is identified as CWE-601.

Affected Systems

Gogs self-hosted Git service, version 0.14.x and earlier (any release before 0.15.0+dev). The vulnerability is fixed in 0.15.0+dev and later releases. Only unauthenticated users can trigger the redirect, so any user accessing the service is at risk.

Risk and Exploitability

The CVSS score is 5.3, indicating a moderate severity. The EPSS score is not available, and the vulnerability is not listed in CISA KEV, suggesting it is not a widely exploited target at this time. Despite this, the flaw is trivial to exploit—an attacker simply crafts a URL with a backslash to the vulnerable /redirect endpoint, or any process that triggers post-action redirects. The open redirect can be leveraged in phishing campaigns, and the impact can be significant if attackers spread malicious campaigns to users of the trusted Gogs domain.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Gogs to 0.15.0+dev or newer.
  • Configure a web application firewall or reverse proxy to reject URLs containing backslashes or scheme‑relative redirects from the /redirect endpoint.
  • Monitor application logs for unexpected redirect requests or suspicious activity and investigate promptly.

Generated by OpenCVE AI on October 15, 2026 at 14:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Gogs
Gogs gogs
Vendors & Products Gogs
Gogs gogs
Type Values Removed Values Added
Description Gogs is an open source self-hosted Git service. Prior to 0.15.0+dev, an unauthenticated attacker can provide a backslash-containing target to the /redirect endpoint, and similar post-action redirect flows are also affected. internal/urlx/urlx.go IsSameSite validates a normalized form of the target while cmd/gogs/internal/web/web.go getRedirect and other callers use the original value in the Location response. This backslash normalization mismatch lets browsers interpret the Location value as a scheme-relative external URL, allowing links on a trusted Gogs domain to redirect victims to attacker-controlled content for phishing. This vulnerability is fixed in 0.15.0+dev.
Title Gogs: Open Redirect in /redirect endpoint via backslash bypass in `IsSameSite`
Weaknesses CWE-601
References
Metrics cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}

Weaknesses
  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 20, 2026, 1:58 AM
Reserved
Aug 28, 2026, 10:00 PM
Status
Deferred
Published
Oct 14, 2026, 7:17 PM
Modified
Oct 20, 2026, 2:17 AM