Skip to main content
Vulnerability Database/CVE-2026-114376

CVE-2026-114376: Wiki-Go Path Traversal Vulnerability

CVE-2026-114376 is a path traversal flaw in Wiki-Go up to version 1.9.1 that allows remote attackers to access unauthorized files. This post explains its technical details, affected versions, impact, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-114376 Overview

CVE-2026-114376 is a path traversal vulnerability [CWE-22] in the leomoon-studios wiki-go project through version 1.9.1. The flaw resides in the SaveHandler and SourceHandler functions within internal/handlers/editor.go, which expose document editor endpoints under the /api/source API route. An authenticated remote attacker can manipulate the request path to read or write files outside the intended document directory. The maintainers released version 1.9.2 with commit 94f7e73ef8df7c58091d72d77a5e26e9fdad98b8 to contain editor paths. A public exploit reference exists through the project's security advisory and VulDB entries.

Critical Impact

Remote authenticated attackers can traverse the filesystem through the editor API, impacting confidentiality, integrity, and availability of wiki content.

Affected Products

  • leomoon-studios wiki-go versions up to and including 1.9.1
  • Component: internal/handlers/editor.go API handlers (SaveHandler, SourceHandler)
  • Fixed in: wiki-go v1.9.2

Discovery Timeline

  • 2026-10-21 - CVE-2026-114376 published to NVD
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2026-114376

Vulnerability Analysis

The vulnerability stems from insufficient validation of user-supplied path segments in the editor API. The SaveHandler and SourceHandler functions accept the HTTP request path after stripping the /api/source prefix and pass it through to document resolution logic without constraining it to the configured wiki root. Attackers who can reach the API can send crafted paths containing traversal sequences to escape the intended DocumentsDir scope. Because both handlers operate on documents, exploitation can affect both read access through the source handler and write access through the save handler. The CWE-22 classification confirms the issue as improper limitation of a pathname to a restricted directory.

Root Cause

The root cause is the direct use of a request-derived path with utils.ResolveDocumentPath without first normalizing or constraining it to the wiki's document root. The patched code replaces this with utils.ResolveRelativeDocumentPath, which enforces the resolution relative to cfg.Wiki.RootDir and cfg.Wiki.DocumentsDir, blocking directory escape via sequences such as ../.

Attack Vector

The attack is network-reachable and requires low privileges (an authenticated session with editor access). An attacker issues HTTP requests to /api/source/<crafted-path> where the crafted path includes traversal segments. No user interaction is required.

go
// Patch excerpt from internal/handlers/editor.go (commit 94f7e73ef8df7c58091d72d77a5e26e9fdad98b8)
// Before: path accepted and resolved without strict containment
// After: request path trimmed and resolved relative to the documents directory

requestPath := strings.TrimPrefix(r.URL.Path, "/api/source")
path := "/"
var docPath string
var dirPath string

// Special case for homepage (root path)
if requestPath == "" || requestPath == "/" {
    docPath = filepath.Join(cfg.Wiki.RootDir, "pages", "home", "document.md")
    dirPath = filepath.Join(cfg.Wiki.RootDir, "pages", "home")
} else {
    resolved, err := utils.ResolveRelativeDocumentPath(
        cfg.Wiki.RootDir,
        cfg.Wiki.DocumentsDir,
        strings.TrimPrefix(requestPath, "/"),
    )
    if err != nil {
        sendJSONError(w, "Invalid document path", http.StatusBadRequest, "")
        return
    }
    _ = resolved
}

Source: GitHub Commit 94f7e73

Detection Methods for CVE-2026-114376

Indicators of Compromise

  • HTTP requests to /api/source/ containing traversal sequences such as ../, %2e%2e%2f, or encoded backslash variants
  • Unexpected 200 responses from /api/source/ requests targeting paths outside the configured DocumentsDir
  • New or modified files on disk outside the wiki document root with timestamps correlating to editor API traffic

Detection Strategies

  • Inspect reverse-proxy and application logs for /api/source and /api/save requests carrying encoded or literal .. segments
  • Alert on requests where the resolved filesystem path falls outside cfg.Wiki.RootDir
  • Compare the wiki-go binary version in deployment against the fixed release v1.9.2 using software inventory data

Monitoring Recommendations

  • Enable verbose access logging on the wiki-go service and forward logs to a centralized analytics platform
  • Monitor file integrity on the host filesystem outside the configured document directory
  • Track authenticated session activity for anomalous volumes of editor API calls from a single account

How to Mitigate CVE-2026-114376

Immediate Actions Required

  • Upgrade all wiki-go deployments to version 1.9.2 or later
  • Audit existing wiki content and the host filesystem for unauthorized files created or modified through the editor API
  • Rotate credentials for any editor accounts suspected of misuse

Patch Information

The fix is delivered in wiki-go v1.9.2 via commit 94f7e73ef8df7c58091d72d77a5e26e9fdad98b8. The patch replaces direct use of the request path with utils.ResolveRelativeDocumentPath, which anchors path resolution within the configured document directory. See the GitHub Security Advisory GHSA-wv68-7fq9-834c and the GitHub Release v1.9.2 notes for details.

Workarounds

  • Restrict access to the wiki-go instance to trusted networks via firewall or reverse-proxy ACLs until the upgrade is applied
  • Place a reverse-proxy rule that rejects requests to /api/source and /api/save containing .., %2e%2e, or encoded path separators
  • Reduce the number of accounts with editor privileges to minimize the authenticated attack surface
bash
# Example nginx rule to block traversal attempts against the editor API
location ~ ^/api/(source|save)/ {
    if ($request_uri ~* "(\.\./|%2e%2e%2f|%2e%2e/|\.\.%2f)") {
        return 400;
    }
    proxy_pass http://wiki_go_upstream;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.