/

CVE-2026-23491

Severity:

HIGH RISK

(7.5)

Path Traversal in InvoicePlane Guest File Retrieval

CVE-2026-23491

Modified

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read / Sensitive Information Disclosure

Severity:

HIGH RISK

(7.5)

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

A path traversal vulnerability in InvoicePlane's Guest module get_file handler allows attackers to manipulate the requested filename to escape the intended directory and read arbitrary files on the server.

When exploited, unauthenticated users may access sensitive files such as configuration data and database credentials simply by crafting malicious file paths.

Affected context

This vulnerability occurs in InvoicePlane installations that expose the Guest-facing file download endpoint (the get_file method of the Get controller).

The issue manifests when user-supplied filenames are used to locate files on disk without normalizing or strictly validating the path against an expected base directory.

Any deployment reachable over a network where the Guest interface is accessible to unauthenticated users can be affected, particularly when configuration or credential files are stored on the same filesystem.

Exploit preconditions

  • Attack surface: Public web interface, specifically the Guest module's file retrieval endpoint.
  • Required access: No authentication required; attacker only needs HTTP access to the affected route.
  • Trigger point: Supplying a crafted filename parameter (e.g., using directory traversal sequences) to the get_file method.
  • Why exploitation is possible: The server-side logic treats the user-controlled filename as a trusted filesystem path, failing to canonicalize, constrain, or validate it against a strict directory whitelist before accessing the file.

Why this happens

The root cause is improper handling of user-controlled path input in the file retrieval logic.

The get_file method in the Guest controller constructs a filesystem path directly from a request parameter without enforcing that the resulting path stays within an allowed directory.

This aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory, where path traversal sequences (such as ../) or absolute paths allow attackers to break out of the intended directory and read arbitrary files.

Insecure patterns include string concatenation for paths, absence of canonical path checks, and lack of enforcement of a fixed document root for downloadable resources.

Potential impact

  • Disclosure of configuration files that may contain database credentials or API keys.
  • Exposure of application logs that could reveal stack traces, internal paths, or other sensitive operational data.
  • Access to source code files, increasing the likelihood of discovering additional vulnerabilities.
  • Leakage of environment-specific secrets or deployment metadata stored on the same server.
  • Potential pivot to further compromise (e.g., using exposed credentials to access databases or other services).

General mitigation guidance

Effective mitigation centers on treating file paths as sensitive and tightly constraining where the application can read from:

  • Resolve and canonicalize any user-supplied path and enforce that it resides within a predefined base directory (e.g., a dedicated uploads or documents directory).
  • Avoid constructing filesystem paths via naive string concatenation; instead use framework or language-standard path utilities that respect directory boundaries.
  • Implement an allowlist of valid file identifiers (e.g., IDs or tokens mapped to stored filenames) instead of exposing raw filenames to clients.
  • Store configuration files, credentials, and environment secrets outside of web-accessible directories and segregate them from user-controlled file storage areas.
  • Apply the principle of least privilege to the web server and application process so they can only read directories that are strictly necessary for operation.

How teams detect issues like this

Detection typically involves a combination of code inspection and behavioral monitoring:

  • Static analysis: Flag code paths where request parameters are concatenated into file paths without canonicalization or directory checks; pattern-match on uses of filesystem APIs that take user input directly.
  • Code review: Look for controllers or endpoints that serve downloads or read files using user-controlled inputs, verifying they enforce base-directory restrictions and avoid relative path traversal.
  • Security testing: Use dynamic analysis or automated scanners to probe file download endpoints with traversal patterns and observe whether unexpected files (config, /etc/ files, or application sources) are accessible.
  • Logging and monitoring: Monitor access logs for suspicious filename patterns (e.g., sequences of ../, URL-encoded traversal, or requests for sensitive known filenames) and treat them as indicators of probing or active exploitation.

Sources

SourceLink
github.comgithub.com/InvoicePlane/InvoicePlane/commit/add8bb798dde621f886823065ef1841986543c69
github.comgithub.com/InvoicePlane/InvoicePlane/security/advisories/GHSA-88gq-mv54-v3fc

Frequently asked

questions

Yes. Because the vulnerable endpoint is part of the Guest-facing interface, an attacker can exploit it remotely over HTTP without needing local system access.

No authentication is required. Any user who can reach the Guest module's file retrieval URL can attempt to supply crafted filenames to read unintended files.

The safest approach is to decouple user input from raw filesystem paths by using indirect identifiers (like file IDs) and mapping them to known safe files stored under a fixed base directory, combined with canonical path checks that reject any request escaping that directory.

Establish a secure file-handling pattern across the codebase: never trust user-supplied paths, enforce strict directory whitelists, keep secrets outside web-accessible areas, and incorporate static analysis and security-focused code review for all file access logic.

Find out what's already
exploitable in your codebase.