/

CVE-2026-30351

Severity:

HIGH RISK

(7.5)

Path Traversal in Autocoder UI/static Component

CVE-2026-30351

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read on Server

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 the UI/static component of leonvanzyl autocoder (commit 79d02a) allows attackers to read arbitrary files on the server by sending crafted URL paths with directory traversal sequences.

When user-controlled path segments are used directly to locate static resources without proper normalization and restriction, an attacker can escape the intended directory and access sensitive files.

Affected context

This issue arises in deployments of leonvanzyl autocoder that serve static files from the UI/static component and construct file system paths directly from URL path segments.

It is relevant where:

  • The application exposes an HTTP endpoint for serving static assets
  • Request paths are mapped to the filesystem without robust normalization and directory restrictions
  • The server process has read access to sensitive files outside the intended static directory

Exploit preconditions

  • Attack surface: HTTP interface serving UI/static resources
  • Required access: Network access to the web server endpoint; no special privileges are inherently required
  • Trigger point: A request whose URL path includes crafted directory traversal sequences (e.g., ../) that are not safely handled
  • Why exploitation is possible: The server trusts user-supplied path components and joins them directly to a filesystem base path without enforcing that the resolved path stays within the static content root

Why this happens

The core problem is the improper restriction of a pathname to a limited directory (CWE-22).

The UI/static handler likely constructs filesystem paths by concatenating a base directory with user-controlled URL segments, performing insufficient normalization or validation.

Without enforcing that the resolved, canonical path remains within the intended static directory, an attacker can use traversal sequences to escape the root and access arbitrary readable files on the host.

Potential impact

  • Disclosure of application configuration files that may contain secrets or API keys
  • Exposure of source code, enabling further vulnerability discovery
  • Access to authentication-related files or logs that can aid in session hijacking or credential theft
  • Leakage of environment-specific information that can facilitate lateral movement or privilege escalation

General mitigation guidance

Effective mitigation focuses on constraining how file paths are resolved and on minimizing what the server can read:

  • Normalize and canonicalize requested paths before use, and ensure the final resolved path is strictly within the intended static root directory
  • Use framework-provided static file serving mechanisms that include built-in path traversal protections instead of custom path concatenation logic
  • Implement allowlists for served resources (e.g., known filenames or extensions) rather than accepting arbitrary paths
  • Run the application with least-privilege filesystem permissions so that even if traversal occurs, highly sensitive files are not readable
  • Separate static content into a dedicated directory tree that contains no secrets or executable logic

How teams detect issues like this

Organizations can detect similar issues by combining review and automated checks:

  • Static analysis for patterns where request path parameters are directly concatenated into filesystem operations (open, sendfile, etc.) without validation
  • Code reviews that specifically examine custom static file handlers or download endpoints, verifying canonical path checks and directory enforcement
  • Security testing and fuzzing of file-serving endpoints using payloads with traversal sequences to validate path normalization logic
  • Runtime monitoring and logging of requests containing ../ or other suspicious path elements, followed by investigation of any successful responses containing unexpected file content

Sources

SourceLink
gist.github.comgist.github.com/syphonetic/0201da0fda7f700e0701d82d755d78a0
github.comgithub.com/leonvanzyl/autocoder

Frequently asked

questions

Yes. Any attacker with network access to the affected HTTP endpoint can attempt to exploit the path traversal by crafting malicious URL paths.

Not necessarily. If the static file endpoint is publicly accessible, exploitation can occur without authentication. If access to that endpoint is gated behind authentication, then valid credentials would be required.

Use a well-vetted static file serving mechanism that performs canonical path resolution and enforces that all resolved paths remain within a defined root directory, avoiding direct concatenation of user input into filesystem paths.

Prefer framework-level helpers for file serving, validate and canonicalize any path derived from user input, enforce directory boundaries with explicit checks, and ensure security reviews focus on any code that maps URLs or user parameters to filesystem locations.

Find out what's already
exploitable in your codebase.