CVE-2026-23633: Gogs has arbitrary file read/write via path traversal in Git hook editing

Published Feb 6, 2026
·
Updated

Vulnerability Description

In the endpoint:

/username/reponame/settings/hooks/git/:name

the :name parameter:

Is URL-decoded by macaron routing, allowing decoded slashes (/) Is then passed directly to:

go git.Repository.Hook("customhooks", name)

which internally resolves the path as:

go filepath.Join(repoPath, "customhooks", name)

Because no path sanitization is applied, supplying ../ sequences allows access to arbitrary paths outside the repository.

As a Result:

GET: Arbitrary file contents are displayed in the hook edit page textarea (Local File Inclusion). POST: Existing files can be overwritten with attacker-controlled content (Arbitrary File Write).

---

Attack Prerequisites

The attacker is an authenticated user The attacker has Admin or higher privileges on the target repository The attacker has the AllowGitHook permission (or is a site administrator) The target file is readable/writable by the Gogs process OS permissions

---

Attack Scenario

1. An attacker (with AllowGitHook + repository Admin privileges) accesses the Git hook edit URL 2. A path containing ../ is supplied in :name, fully URL-encoded using %2f 3. The server resolves customhooks/../../... without validation 4. Arbitrary file contents are displayed and existing files can be overwritten

---

Potential Impact

Sensitive information disclosure: app.ini, databases, logs, environment variables, etc. Configuration or data tampering: Overwriting existing files Secondary impact: Extraction of SECRETKEY and database credentials may allow token forging or further compromise

Other sources

Gogs is an open source self-hosted Git service. In version 0.13.3 and prior, there is an arbitrary file read/write via path traversal in Git hook editing. This issue has been patched in versions 0.13.4 and 0.14.0+dev.

MITRE

Affected Software

3 affected componentsFixes available
Gogs Gogs<=0.13.3
go/gogs.io/gogs<=0.13.3
0.13.4
Gogs Gogs<0.13.4

Event History

Feb 6, 2026
CVE Published
via MITRE·05:46 PM
Data Sourced
via MITRE·05:46 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·06:14 PM
Data Sourced
via GitHub·06:14 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via NVD·06:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:15 PM
Affected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-23633?

The severity of CVE-2026-23633 is rated as critical due to its potential for arbitrary file read/write vulnerabilities.

2

How do I fix CVE-2026-23633?

To fix CVE-2026-23633, upgrade Gogs to version 0.13.4 or later.

3

What vulnerabilities does CVE-2026-23633 expose my system to?

CVE-2026-23633 exposes your system to potential unauthorized access to sensitive files and modification of files due to path traversal.

4

In which versions of Gogs is CVE-2026-23633 present?

CVE-2026-23633 is present in Gogs versions up to and including 0.13.3.

5

What types of attacks can exploit CVE-2026-23633?

CVE-2026-23633 can be exploited through path traversal attacks, allowing attackers to gain unauthorized file access.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203