gogs.io/gogs

CVE-2026-52802

CVE-2026-52802 is a medium-severity open redirect vulnerability in gogs.io/gogs (go), affecting versions <= 0.14.2. It is fixed in 0.14.3.

Key facts
CVSS score
5.4
Medium
Attack vector
Network
Issuing authority
GitHub Advisory Database
Affected package
gogs.io/gogs
Fixed in
0.14.3
Disclosed
2026

Summary

Summary An open redirect vulnerability exists in Gogs where attacker-controlled redirectto parameters can bypass validation, allowing redirection to arbitrary external sites. Details All redirects in Gogs that are validated via the IsSameSite function are vulnerable: The function only inspects the first two characters of the URL string. This check fails to account for directory traversal sequences followed by backslashes. For example: The IsSameSite function checks the input supplied to the redirectto query parameter value /a/../\example.com and considers it valid. Because web browsers normalize backslashes \ to forward slashes /, the normalized URL becomes //example.com. The normalized URL becomes: Resulting in a cross-origin redirect. This affects all endpoints using the redirectto query parameter, including login and other post-action flows. PoC An attacker can provide a user with a link to login to Gogs with a redirectto query parameter that redirects a user to a site the attacker wants them to visit: <img width="1339" height="536" alt="image" src="https://github.com/user-attachments/assets/3c2a13b8-f0b7-42c2-a223-6f0ebf083589" /> <br> <br> After the user successfully logs in, they would be redirected to the site an attacker wants them to visit: <img width="1066" height="463" alt="image" src="https://github.com/user-attachments/assets/1726a3d9-6705-43cc-bdd2-90aad105d021" /> <img width="1097" height="396" alt="image" src="https://github.com/user-attachments/assets/376052f5-0e00-4d14-a548-fa75a6269530" /> Impact Phishing: Attackers can use trusted domain links to redirect victims to credential-harvesting pages OAuth/SSO Token Theft: In authentication flows, authorization codes or tokens may leak via redirect Referer Leakage: Sensitive URL parameters may be exposed to attacker domains via the Referer header Cache Poisoning: In deployments with shared caches, malicious redirects may be cached and served to other users

Impact

What is open redirect?

Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites. Typical impact: phishing and credential harvesting via a trusted domain.

Severity and exposure

CVE-2026-52802 has a CVSS score of 5.4 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (0.14.3). Upgrading removes the vulnerable code path.

Affected versions

go

  • gogs.io/gogs (<= 0.14.2)

Security releases

  • gogs.io/gogs → 0.14.3 (go)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2026-52802 is reachable in your applications. Explore open-source security for your team.

See if CVE-2026-52802 is reachable in your applications. Get a demo

Already deployed Kodem? See CVE-2026-52802 in your environment

Remediation advice

Upgrade gogs.io/gogs to 0.14.3 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2026-52802

What is CVE-2026-52802?

CVE-2026-52802 is a medium-severity open redirect vulnerability in gogs.io/gogs (go), affecting versions <= 0.14.2. It is fixed in 0.14.3. Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites.

How severe is CVE-2026-52802?

CVE-2026-52802 has a CVSS score of 5.4 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which versions of gogs.io/gogs are affected by CVE-2026-52802?

gogs.io/gogs (go) versions <= 0.14.2 is affected.

Is there a fix for CVE-2026-52802?

Yes. CVE-2026-52802 is fixed in 0.14.3. Upgrade to this version or later.

Is CVE-2026-52802 exploitable, and should I be worried?

Whether CVE-2026-52802 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2026-52802 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2026-52802?

Upgrade gogs.io/gogs to 0.14.3 or later.

Stop the waste.
Protect your environment with Kodem.