CVE-2026-25119

Gogs: Authentication Bypass via Unvalidated Reverse Proxy Headers

Published Jun 24, 2026 CVSS 4.0 · 7.7 High EPSS < 1% KEV · Not listed
Description
Gogs is an open source self-hosted Git service. Prior to 0.14.3, when ENABLE_REVERSE_PROXY_AUTHENTICATION is enabled, Gogs accepts the configured authentication header (default: X-WEBAUTH-USER) directly from client requests without validating that the request originated from a trusted reverse proxy. Any remote attacker who can reach the Gogs service can forge this header to impersonate any user or trigger automatic account creation, completely bypassing authentication. This vulnerability is fixed in 0.14.3.

Analysis

AI-generated

Technical impact

The vulnerability is an authentication bypass via unvalidated reverse proxy headers. When Gogs enables reverse proxy authentication, it accepts a header such as X‑WEBAUTH‑USER directly from client requests without confirming that the request originated from a trusted reverse proxy. This weakness is a form of insecure trust of external authentication info (CWE‑290). As a result, any remote user who can reach the Gogs service may forge this header, causing Gogs to authenticate as any user or automatically create a new account. This allows full impersonation and unauthorized access, violating confidentiality and integrity.

Affected Systems

Affected are installations of the Gogs open‑source Git service running any version prior to v0.14.3 when reverse proxy authentication is enabled.

Risk and Exploitability

The CVSS score of 7.7 indicates a high severity. EPSS is not available, and the vulnerability is not listed in the CISA KEV catalog. The attacker only needs network access to the Gogs instance. By sending a request with a forged X‑WEBAUTH‑USER header, the attacker can impersonate any existing user or create a new account, effectively bypassing authentication and gaining full control over the repository server.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Gogs v0.14.3 or later to apply the official fix.
  • If upgrading is not immediately possible, disable reverse proxy authentication by setting ENABLE_REVERSE_PROXY_AUTHENTICATION to false and ensure that no external headers are accepted.
  • Alternatively, configure Gogs to validate the source of reverse proxy headers, restricting them to trusted IP addresses or internal networks, or change the header that is accepted for reverse proxy authentication.

Generated by OpenCVE AI on June 24, 2026 at 21:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-w6j9-vw59-27wv Gogs has an Authentication Bypass via Unvalidated Reverse Proxy Headers
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, '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.14.3, when ENABLE_REVERSE_PROXY_AUTHENTICATION is enabled, Gogs accepts the configured authentication header (default: X-WEBAUTH-USER) directly from client requests without validating that the request originated from a trusted reverse proxy. Any remote attacker who can reach the Gogs service can forge this header to impersonate any user or trigger automatic account creation, completely bypassing authentication. This vulnerability is fixed in 0.14.3.
Title Gogs: Authentication Bypass via Unvalidated Reverse Proxy Headers
Weaknesses CWE-290
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-290

    Authentication Bypass by Spoofing

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 25, 2026, 5:12 PM
Reserved
Jan 29, 2026, 2:03 PM
Status
Deferred
Published
Jun 24, 2026, 9:16 PM
Modified
Jun 25, 2026, 6:16 PM