SB2026112596 - Multiple vulnerabilities in gogs



SB2026112596 - Multiple vulnerabilities in gogs

Published: November 25, 2026

Security Bulletin ID SB2026112596
CSH Severity
High
Patch available
YES
Number of vulnerabilities 12
Exploitation vector Remote access
Highest impact Code execution

Breakdown by Severity

High 8% Medium 42% Low 50%
  • Low
  • Medium
  • High
  • Critical

Description

This security bulletin contains information about 12 vulnerabilities.


1) Incorrect Behavior Order: Validate Before Canonicalize (CVE-ID: N/A)

CWE-ID: CWE-180 - Incorrect Behavior Order: Validate Before Canonicalize

CVSSv4: 0 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to execute arbitrary code on a Windows-hosted Gogs instance.

The vulnerability exists due to path validation before Windows path normalization in isRepositoryGitPath when processing repository file writes. A remote attacker can use repository write access through the web editor or repository contents API to modify protected Git configuration and thereby execute arbitrary code.


2) Argument injection (CVE-ID: CVE-2026-84362)

CWE-ID: CWE-88 - Argument Injection or Modification

CVSSv4: 5.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote user to cause internal repository paths and configuration details to be recorded in server-side error logs.

The vulnerability exists due to improper separation of command options and arguments in the Gogs git-module RevParse function when it passes user-controlled revisions to git rev-parse. A remote user can supply option-like values in place of commit or branch references through the repository API to expose those details to anyone with access to the logs.


3) Authorization bypass through user-controlled key (CVE-ID: N/A)

CWE-ID: CWE-639 - Authorization Bypass Through User-Controlled Key

CVSSv4: 6 [CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote user to download attachments from private repositories and detach them from their original records.

The vulnerability exists due to missing authorization in the attachment-binding logic when issue, comment, and release workflows process user-supplied attachment identifiers. A remote user can abuse cross-repository attachment reassignment to bypass download restrictions that rely on the attachment's current repository association.


4) Missing Authorization (CVE-ID: N/A)

CWE-ID: CWE-862 - Missing Authorization

CVSSv4: 5.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote user to post unauthorized comments in private repository issues and determine whether those issues exist.

The vulnerability exists due to missing authorization in updateCommitReferencesToIssues when processing cross-repository issue references in pushed commit messages. A remote user can misuse automatic reference comments to insert controlled text and links into private issues and infer their existence from the response.


5) Path traversal (CVE-ID: N/A)

CWE-ID: CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

CVSSv4: 7.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote user to read arbitrary files accessible to the Gogs process on Windows, including configuration files containing secrets and database credentials.

The vulnerability exists due to path traversal in the repository AutoInit template loader when it normalizes user-supplied template names without accounting for Windows path separators. A remote user can supply a crafted template name through the repository creation form or API to retrieve file contents from the new repository's initial commit.


6) Incorrect authorization (CVE-ID: N/A)

CWE-ID: CWE-863 - Incorrect Authorization

CVSSv4: 8.6 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote user to retain read and write access to previously accessible repositories after an administrator deactivates the account or prohibits login.

The vulnerability exists due to missing account-status checks in Gogs when authenticating requests with personal access tokens or SSH keys. A remote user can use an existing personal access token through the API, Git over HTTP, or Git LFS, or an existing SSH key through Git over SSH, to continue reading and modifying repository contents after lockout.


7) Improper Authentication (CVE-ID: N/A)

CWE-ID: CWE-287 - Improper Authentication

CVSSv4: 9.1 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to take over an account without knowing or changing its password or completing two-factor authentication.

The vulnerability exists due to improper authentication in the legacy and web API account activation handlers when they accept password-reset codes as activation credentials and create sessions for already active accounts without checking the second factor. A remote attacker can misuse a valid reset code obtained from the victim's email to gain an authenticated session as the victim.


8) Server-Side Request Forgery (SSRF) (CVE-ID: N/A)

CWE-ID: CWE-918 - Server-Side Request Forgery (SSRF)

CVSSv4: 7.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:L/SI:N/SA:N]


The vulnerability allows a remote user to reach restricted services through the Gogs server and potentially disclose sensitive information.

The vulnerability exists due to incomplete IPv6 destination filtering in the outbound request guard when validating remote URLs. A remote user can abuse repository migration, mirror synchronization, or webhook functionality to direct server-side requests to restricted destinations.


9) Cross-site scripting (CVE-ID: N/A)

CWE-ID: CWE-79 - Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

CVSSv4: 5.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N]


The vulnerability allows a remote user to execute arbitrary JavaScript in another user's browser under the Gogs origin, potentially reading sensitive data and performing actions with the viewer's privileges.

The vulnerability exists due to improper neutralization of HTML in Gogs issue detail and dashboard issue list templates when they render stored LDAP bind-DN usernames as trusted HTML without sanitizing them. A remote user can supply a crafted LDAP username to execute script when another user views an affected page.


10) External Control of File Name or Path (CVE-ID: N/A)

CWE-ID: CWE-73 - External Control of File Name or Path

CVSSv4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to read files accessible to the Gogs server process, potentially exposing credentials and signing secrets.

The vulnerability exists due to unrestricted external control of file paths in the go-org renderer used by Gogs when rendering repository content in Org mode. A remote attacker can view a crafted public repository document to obtain server file contents disclosed through the include directive, while the related setup-file directive reads files without directly displaying their contents.


11) Improper Resolution of Path Equivalence (CVE-ID: N/A)

CWE-ID: CWE-41 - Improper Resolution of Path Equivalence

CVSSv4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a remote user to execute arbitrary code as the Gogs service account on Windows hosts using NTFS.

The vulnerability exists due to improper resolution of path equivalence in the Gogs web editor's isRepositoryGitPath guard when NTFS alternate data stream syntax or short-name aliases refer to the protected Git metadata directory. A remote user can abuse repository write access through the web editor to execute arbitrary code via server-side Git hooks.


12) Argument injection (CVE-ID: CVE-2026-82401)

CWE-ID: CWE-88 - Argument Injection or Modification

CVSSv4: 7.2 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a remote user to create or overwrite files at server paths writable by Gogs, potentially disrupting service.

The vulnerability exists due to argument injection in DiffBinary when Git interprets user-controlled branch names as command options during pull request comparisons. A remote user can supply a crafted branch name to redirect diff output to a server file of their choice.


Remediation

Install update from vendor's website.