/

CVE-2026-42564

Severity:

HIGH RISK

(8.2)

Path Traversal in jotty·page app-icons Endpoint

CVE-2026-42564

Deferred

Vulnerability type

Category:

Path Traversal / Directory Traversal

CWE:

CWE-22, CWE-200

Impact:

Unauthorized File Read / Information Disclosure

Severity:

HIGH RISK

(8.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

An unauthenticated path traversal vulnerability in jotty·page's /api/app-icons/[filename] endpoint allows attackers to read arbitrary files on the server by manipulating the filename route parameter.

Because the parameter is joined directly into a filesystem path without boundary validation, any publicly exposed instance may leak sensitive server-side files outside the intended data/uploads/app-icons/ directory.

Affected context

The issue affects self-hosted jotty·page instances that expose the /api/app-icons/[filename] route over a network and rely on it to serve application icon files from data/uploads/app-icons/.

The vulnerability is present when:

  • User-supplied path segments are concatenated directly into filesystem paths, and
  • There is no normalization or check that the resolved path stays under the intended data/uploads/app-icons/ directory.

Environments hosting sensitive configuration, logs, or credentials on the same filesystem are particularly at risk.

Exploit preconditions

  • Attack surface: HTTP(S) interface, specifically the /api/app-icons/[filename] endpoint.
  • Required access: No authentication or prior session is required; any network user who can reach the endpoint can send crafted requests.
  • Trigger point: Supplying a crafted filename path segment that includes directory traversal sequences or absolute/relative path tricks.
  • Why exploitation is possible: The server joins the filename parameter into a filesystem path without enforcing directory boundaries, canonicalizing paths, or rejecting traversal sequences, allowing access to files outside data/uploads/app-icons/.

Why this happens

This vulnerability stems from treating a user-controlled path component as a trusted filesystem path without proper validation or normalization.

The code path responsible for serving app icons:

  • Takes the filename route parameter directly from the HTTP request.
  • Uses it to construct a filesystem path under the assumption it remains inside data/uploads/app-icons/.
  • Fails to enforce that the resolved path is confined to this directory.

Conceptually, this matches CWE-22: Improper Limitation of a Pathname to a Restricted Directory, where directory traversal sequences (for example, using parent directory references) or crafted paths can escape the intended root.

Because the resulting path is then opened and returned in the HTTP response, it also maps to CWE-200: Exposure of Sensitive Information, as arbitrary readable files on the host may be disclosed.

Potential impact

  • Disclosure of configuration files that may contain database credentials, API keys, or other secrets.
  • Exposure of application logs that can reveal internal paths, stack traces, or user data.
  • Leakage of system files (e.g., OS configuration, user account metadata) readable by the application process.
  • Facilitation of further attacks, such as authentication bypass, account takeover, or command execution, using harvested secrets or internal information.

General mitigation guidance

Effective mitigation focuses on constraining how filesystem paths are derived from user input and strictly enforcing directory boundaries:

  • Treat all path components derived from HTTP parameters as untrusted, even when seemingly simple (e.g., filenames).
  • Normalize and canonicalize the requested path, then verify it remains within the intended base directory (such as data/uploads/app-icons/) before access.
  • Maintain a fixed, server-side base directory and join only sanitized filenames (not arbitrary paths); reject inputs containing directory separators, traversal sequences, or disallowed characters.
  • Consider using whitelisting strategies, such as mapping logical icon IDs to stored filenames, rather than allowing direct arbitrary filename access.
  • Run the application under a dedicated, least-privileged account and limit file system permissions so that even if traversal occurs, access to sensitive OS or configuration files is restricted.
  • Implement centralized helper utilities for safe path handling and reuse them across endpoints that touch the filesystem.

How teams detect issues like this

Organizations can look for directory traversal risks and unintended file exposure using multiple approaches:

  • Static analysis: Configure rules to flag direct concatenation of request parameters (route segments, query strings) into filesystem operations (open, read, sendFile, etc.) without validation or canonicalization.
  • Code review: Examine routes serving files from user-controlled names; verify that there is:
  • A fixed base directory,
  • Canonicalization of the constructed path, and
  • A strict check that the resulting path resides under the base directory.
  • Dynamic testing: Use web scanners or manual tests with traversal patterns (e.g., parent-directory references) against file-serving endpoints to detect unauthorized file access.
  • Runtime monitoring: Inspect access logs for suspicious file requests, such as those containing traversal sequences, unusual extensions, or access to system paths, and generate alerts on such patterns.

Sources

SourceLink
github.comgithub.com/fccview/jotty/security/advisories/GHSA-7843-gwq8-g96f

Frequently asked

questions

Yes. Any remote user who can reach the /api/app-icons/[filename] endpoint can attempt to exploit this issue by crafting the filename parameter, without needing a valid account.

Only network-level access to the vulnerable instance is required. No authentication or elevated privileges are necessary, although the scope of files that can be read is limited by the permissions of the jotty·page process on the host.

Use a fixed base directory, canonicalize the combined path, and enforce that the resolved path remains inside the intended directory before file access.

Additionally, treat the client-supplied value as a logical identifier (like an icon ID) and map it to a safe server-side filename rather than using raw user-controlled paths.

Standardize safe file-handling utilities, disallow direct use of request parameters in filesystem operations, and enforce secure coding guidelines that require path normalization and boundary checks.

Augment these practices with automated static analysis, security-focused code review checklists, and routine dynamic tests for directory traversal across file-serving endpoints.

Find out what's already
exploitable in your codebase.