CVE-2026-134808 in Gogsinfo

Summary

by MITRE • 11/22/2026

Gogs before 0.14.4 on Windows contains a path equivalence vulnerability in isRepositoryGitPath that allows authenticated users with write access to bypass .git directory protection using NTFS aliases. Attackers can create, rename or upload files via aliases like git~1 or .git::$INDEX_ALLOCATION to overwrite .git/config or hooks and execute commands as the Gogs process.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 11/22/2026

The vulnerability identified in versions of Gogs prior to 0.14.4 represents a critical security flaw rooted in improper handling of file system paths on Microsoft Windows operating systems. This issue specifically affects the isRepositoryGitPath function, which serves as a gatekeeper for validating whether requested repository operations are restricted from accessing sensitive Git metadata directories. The core technical failure lies in the application's inability to normalize or strictly validate path inputs against NTFS-specific features that allow alternative naming conventions and stream access mechanisms. By leveraging these operating system-level characteristics, an authenticated user with write permissions can circumvent the intended directory restrictions designed to protect critical configuration files and execution hooks within the .git directory structure.

The exploitation mechanism relies on two primary techniques associated with Windows file systems: NTFS aliasing and alternate data streams. Attackers can utilize short filename aliases, such as git~1, which are automatically generated by the NTFS file system for compatibility purposes but may not be correctly filtered or resolved by the application logic during path validation checks. Additionally, attackers can target specific internal structures of the .git directory using Alternate Data Streams (ADS), specifically targeting components like .git::$INDEX_ALLOCATION. These streams allow data to be stored within a file without appearing in standard directory listings, effectively bypassing superficial string-based or basic path matching algorithms employed by the vulnerable software version. This allows an attacker to write directly into protected areas of the repository structure that should remain immutable during normal user operations.

The operational impact of this vulnerability is severe due to its potential for Remote Code Execution (RCE). By successfully writing files through these aliasing techniques, an attacker can overwrite critical configuration files such as .git/config or manipulate Git hooks like post-receive or pre-commit scripts. Since Gogs typically runs with the privileges necessary to manage repository data and execute build processes, any code injected into these hook scripts will be executed by the Gogs process itself upon subsequent git operations triggered by other users or automated systems. This effectively grants the attacker full control over the server hosting the Gogs instance, allowing them to install backdoors, exfiltrate sensitive source code, pivot to internal network resources, or disrupt service availability through denial-of-service conditions created via malicious hook execution.

From a classification perspective, this vulnerability aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory, as the application fails to restrict access to specific directories despite having such restrictions defined in its logic. Furthermore, it relates to CWE-78: Improper Neutralization of Special Elements used in an OS Command (OS Command Injection) because the ultimate goal and result involve executing arbitrary commands via manipulated Git hooks. In terms of adversary tactics, this exploit maps directly to MITRE ATT&CK technique T1059.004: PowerShell or other script execution within a CI/CD pipeline context if Gogs is used for automation, but more broadly it fits under Initial Access and Persistence mechanisms where an attacker establishes foothold by modifying trusted configuration files that are automatically executed by the service account running the application.

Mitigation strategies must prioritize immediate software updates to version 0.14.4 or later, where this path equivalence issue has been addressed through improved input validation and normalization logic. Administrators should also enforce strict least-privilege principles for the Gogs process identity, ensuring it does not run with excessive system-level permissions that would amplify the impact of a successful exploitation attempt. Additionally, implementing file integrity monitoring on critical directories such as .git can provide early detection indicators if unauthorized modifications occur due to delayed patching. Organizations should also review their CI/CD pipelines and hook configurations to ensure no sensitive data is hardcoded in executable scripts, thereby reducing the blast radius even if similar vulnerabilities are discovered in future versions of the software or related components.

Responsible

VulnCheck

Reservation

11/22/2026

Disclosure

11/22/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!