/

CVE-2026-30958

Severity:

HIGH RISK

(7.2)

Path Traversal in OneUptime Workflow Docs Endpoint

CVE-2026-30958

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read / Information Disclosure

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OneUptime versions prior to 10.0.21 contain an unauthenticated path traversal vulnerability in the /workflow/docs/:componentName endpoint that enables arbitrary file reads from the server filesystem.

By manipulating the componentName route parameter, an attacker can traverse directories and access sensitive files that the OneUptime process can read.

Affected context

This vulnerability occurs in the OneUptime web application layer, specifically within the workflow documentation feature exposed at /workflow/docs/:componentName.

The server-side implementation in Worker/FeatureSet/Workflow/Index.ts concatenates the componentName route parameter directly into a filesystem path passed to res.sendFile() without sanitization or normalization checks.

The issue is relevant where the application is reachable over the network and runs with access to sensitive configuration, logs, or source code files on the host.

Exploit preconditions

  • Attack surface: Public HTTP(S) interface of the OneUptime application.
  • Required access: No authentication or prior session required; exploitable by any network user who can reach the /workflow/docs/:componentName route.
  • Trigger point: A crafted componentName value in the URL (e.g., using directory traversal sequences) that manipulates the resulting file path.
  • Why exploitation is possible: The route parameter is concatenated into a filesystem path and passed directly to res.sendFile() without path normalization, traversal checks, or access control, allowing escape from the intended documentation directory.

Why this happens

The root cause aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

The server builds a file path by directly appending user-controlled input (:componentName) onto a base directory and then serves that file via res.sendFile().

Without proper canonicalization, validation, or enforcement that the resolved path remains within an allowed directory, attackers can use traversal patterns (e.g., ../) or absolute-like segments to cause the server to read and return unintended files.

This pattern reflects a broader issue of treating path components from external input as trustworthy and not constraining file access to a strict, whitelisted set of resources.

Potential impact

  • Access to application configuration files that may contain database credentials, API keys, or encryption secrets.
  • Exposure of server-side source code, facilitating further vulnerability discovery and exploitation.
  • Disclosure of log files that may include user data, internal endpoint details, or operational metadata.
  • Leakage of environment files or system configuration that can support privilege escalation or lateral movement.
  • Indirect assistance in planning more severe attacks such as remote code execution via separate weaknesses.

General mitigation guidance

Effective mitigation focuses on strictly constraining file access and removing trust in route parameters for filesystem decisions:

  • Replace dynamic path concatenation with a whitelist-based lookup, where componentName maps to predefined, known documentation files rather than arbitrary filenames.
  • Enforce path normalization and traversal checks: resolve the requested path to its canonical form and verify it resides inside a designated documentation directory before serving.
  • Use framework-level helpers or middleware (when available) that restrict sendFile operations to specific root directories and reject any paths that break out of that root.
  • Apply authentication and authorization to documentation endpoints if they expose potentially sensitive internal materials.
  • Run the application under a least-privilege account with filesystem permissions limited to what the service strictly needs, reducing the blast radius of any file read.

How teams detect issues like this

Detection generally centers on code patterns and runtime behavior:

  • Static analysis: Flag any usage of res.sendFile(), fs.readFile(), or similar APIs where arguments are derived from user input (including route parameters) without normalization or directory constraints.
  • Code review: Look for manual string concatenation to form file paths, absence of path validation utilities, and endpoints that serve files based solely on user-controlled segments.
  • Security testing: Use dynamic application security testing (DAST) to probe endpoints with ../ sequences and monitor whether responses contain unexpected file content or error messages disclosing filesystem paths.
  • Logging and monitoring: Instrument file-serving routes to log canonical paths being served and raise alerts on attempts to access paths outside the intended documentation directory.

Sources

SourceLink
github.comgithub.com/OneUptime/oneuptime/releases/tag/10.0.21
github.comgithub.com/OneUptime/oneuptime/security/advisories/GHSA-p2wh-9pw8-hvff

Frequently asked

questions

Yes. Any remote user who can reach the affected /workflow/docs/:componentName endpoint can attempt path traversal requests without authentication.

No. The vulnerable route is described as unauthenticated, so exploitation does not require a login or existing session under typical configurations.

Replace direct path concatenation with a strict mapping from allowed componentName values to specific files, enforce canonicalization and directory bounds checks, and optionally protect the endpoint with access control where appropriate.

Adopt a design rule that user input must never directly determine filesystem paths; instead, use whitelists, centralized file-serving helpers, static mapping tables, and automated code review or static analysis rules that flag raw path construction from external input.

Find out what's already
exploitable in your codebase.