# CVE-2026-24135: gogs Path Traversal — Fixed in 0.13.4

🐹 Go

Not in CISA KEV

# CVE-2026-24135 — gogs

CVE-2026-24135 is a Path Traversal vulnerability in gogs.io/gogs. A fix is available for gogs.io/gogs — see the affected versions and patch details below.

Gogs vulnerable to arbitrary file deletion via path traversal in wiki page update

Also known as[GHSA-jp7c-wj6q-3qf2](/vulnerability/GHSA-jp7c-wj6q-3qf2)GO-2026-4452

Published

Feb 6, 2026

Updated

Oct 28, 2026

Affected

1 pkg

Patched

1 / 1

Exploits

None indexed

Exploitation data as of Nov 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

## Exploitation Status

### Proof-of-concept exploit code exists

-   CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-24135.

## EPSS Exploitation Probability

[via FIRST.org ↗](https://www.first.org/epss/)

1.0%probability of exploitation in next 30 days

Lower Risk0.00%

Lower risk than most CVEs62th percentile — riskier than 62% of all scored CVEsHighest risk

0.00%0.49%0.98%1.46%0.1%1.0%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from [FIRST.org EPSS](https://www.first.org/epss/).

## Real-World Exposure

1 pkg affected

🐹`gogs.io/gogs`

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

## Description

#### Summary

A Path Traversal vulnerability exists in the `updateWikiPage` function of Gogs. The vulnerability allows an authenticated user with write access to a repository's wiki to delete arbitrary files on the server by manipulating the `old_title` parameter in the wiki editing form.

#### Vulnerability Deatils

The vulnerability is located in `internal/database/wiki.go`. When updating a wiki page, the application accepts an `old_title` parameter to identify the potential rename operation. This parameter is used directly in `path.Join` and `os.Remove` without proper sanitization.

Code snippet from `internal/database/wiki.go`:

```
// Line 114
os.Remove(path.Join(localPath, oldTitle+".md"))
```

If an attacker provides a path traversal sequence (e.g., `../../../../target`) as `old_title`, the `os.Remove` function will resolve the path relative to the wiki's local directory and delete the target file. The vulnerability is limited to deleting files that end with `.md` (due to the appended extension), but depending on the filesystem and specific `path.Join` behavior, or if critical `.md` files exist (e.g. documentation, other wikis), the impact is significant. Additionally, in some contexts, the extension might be bypassed or ignored.

#### Impact

-   **Denial of Service**: Deletion of critical configuration files or data (if they match the extension or via other tricks).
-   **Data Loss**: Deletion of other users' wiki pages or documentation.

#### Remediation

Sanitize the `oldTitle` parameter using `ToWikiPageName` (or `path.Clean` and basename validation) before using it in file operations, similar to how the new `title` is currently handled.

```
// Recommended Fix
if oldTitle != "" {
    oldTitle = ToWikiPageName(oldTitle)
}
```

#### Reproduction Steps

1.  Log in to Gogs as a user with write access to a repository wiki.
2.  Intercept the `POST` request to `/repo/wiki/edit`.
3.  Modify the `old_title` parameter to `../../../../tmp/target_file`.
4.  Submit the request.
5.  Observe that `/tmp/target_file.md` is deleted from the server.

## Affected Packages

1 total 1 fixed

Ecosystem

Package

Vulnerable range

Fix

🐹Go

`gogs.io/gogs` 

all versions

0.13.4`go get gogs.io/gogs@v0.13.4`

## Affected Products

1 product · 1 configurations

Application

`gogs`gogs

< 0.13.4

range

## Detection & mitigation playbook

Open-source dependency

1.  ### Detect
    
    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gogs.io/gogs, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
    
2.  ### Fix
    
    Update gogs.io/gogs to 0.13.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-24135 is resolved across your whole dependency graph.
    
3.  ### Workarounds
    
    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
    

## Frequently Asked Questions

\### Summary A Path Traversal vulnerability exists in the \`updateWikiPage\` function of Gogs. The vulnerability allows an authenticated user with write access to a repository's wiki to delete arbitrary files on the server by manipulating the \`old\_title\` parameter in the wiki editing form. ### Vulnerability Deatils The vulnerability is located in \`internal/database/wiki.go\`. When updating a wiki page, the application accepts an \`old\_title\` parameter to identify the potential rename operation. This parameter is used directly in \`path.Join\` and \`os.Remove\` without proper sanitization. Code snippe

O3 Security · Impact-Aware SCA

### Is CVE-2026-24135 in your dependencies?

Find it across Go, including transitive dependencies.

[Scan my dependencies](/book-demo) [How O3 SCA works](/impact-aware-sca)