CVE-2026-24135
Unknown Unknown - Not Provided
Path Traversal in Gogs Wiki Allows Arbitrary File Deletion

Publication date: 2026-02-06

Last updated on: 2026-02-17

Assigner: GitHub, Inc.

Description
Gogs is an open source self-hosted Git service. In version 0.13.3 and prior, 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. This issue has been patched in versions 0.13.4 and 0.14.0+dev.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-06
Last Modified
2026-02-17
Generated
2026-05-07
AI Q&A
2026-02-06
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
gogs gogs to 0.13.4 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

[{'type': 'paragraph', 'content': 'CVE-2026-24135 is a path traversal vulnerability in the Gogs open source Git service, specifically in the updateWikiPage function. It affects versions 0.13.3 and earlier.'}, {'type': 'paragraph', 'content': "The issue occurs because the old_title parameter, used when renaming wiki pages, is not properly sanitized before being used to delete files on the server. An authenticated user with write access to a repository's wiki can manipulate this parameter to delete arbitrary .md files outside the intended wiki directory by including path traversal sequences."}, {'type': 'paragraph', 'content': 'This means the attacker can delete important files on the server by tricking the system into removing files it should not, potentially causing data loss or denial of service.'}] [1]


How can this vulnerability impact me? :

[{'type': 'paragraph', 'content': 'This vulnerability can lead to serious impacts including:'}, {'type': 'list_item', 'content': 'Denial of Service (DoS) by deleting critical configuration or data files on the server.'}, {'type': 'list_item', 'content': "Data loss through deletion of other users' wiki pages or important documentation."}, {'type': 'paragraph', 'content': 'Since the deletion is limited to files with a .md extension, the impact depends on what markdown files exist on the server, but critical files could be targeted.'}] [1]


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

[{'type': 'paragraph', 'content': 'This vulnerability can be detected by monitoring for suspicious POST requests to the /repo/wiki/edit endpoint in Gogs, especially those containing the old_title parameter with path traversal sequences such as ../../../../.'}, {'type': 'paragraph', 'content': 'One way to detect exploitation attempts is to intercept and inspect HTTP requests made by authenticated users with write access to repository wikis.'}, {'type': 'paragraph', 'content': 'Example commands to detect such activity might include using network traffic capture tools like tcpdump or Wireshark to filter HTTP POST requests to /repo/wiki/edit, or using web server logs to search for suspicious old_title parameter values.'}, {'type': 'list_item', 'content': "Use tcpdump to capture HTTP POST requests to the wiki edit endpoint: tcpdump -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | grep 'POST /repo/wiki/edit'"}, {'type': 'list_item', 'content': "Search web server logs for suspicious old_title parameters containing path traversal sequences: grep 'old_title=.*\\.\\.\\/\\.\\.\\/' /path/to/gogs/access.log"}, {'type': 'paragraph', 'content': 'Additionally, monitoring for unexpected deletions of .md files outside the wiki directory on the server filesystem may indicate exploitation.'}] [1]


What immediate steps should I take to mitigate this vulnerability?

The immediate mitigation step is to upgrade Gogs to version 0.13.4 or later, where the vulnerability has been patched.

If upgrading is not immediately possible, restrict write access to repository wikis to trusted users only, as exploitation requires authenticated write access.

Additionally, monitor and sanitize the old_title parameter in any custom proxies or middleware to prevent path traversal sequences.

The patch involves sanitizing the old_title parameter before it is used to delete files, for example by applying functions like ToWikiPageName or path.Clean and basename validation.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart