/

CVE-2026-36723

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-22) in Bookcars create-user API

CVE-2026-36723

Deferred

Vulnerability type

Category:

Path Traversal / Directory Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write and Potential Remote Code Execution

Severity:

HIGH RISK

(8.8)

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 unrestricted file rename flaw in Bookcars v8.3's /api/create-user endpoint lets authenticated users use directory traversal patterns to relocate files from temporary storage to arbitrary filesystem paths.

When exploited, this behavior can expose sensitive data, overwrite application resources, and potentially enable remote code execution on the server.

Affected context

This vulnerability arises in deployments of Bookcars v8.3 that expose the /api/create-user endpoint and rely on server-side temporary storage for uploaded or generated files.

The risk is present when the server constructs destination file paths using user-influenced data without constraining the final resolved path to an expected directory.

It is especially impactful in environments where the application process has write access to configuration directories, executable code paths, or locations containing sensitive files.

Exploit preconditions

  • Attack surface: HTTP interface of the Bookcars /api/create-user endpoint
  • Required access: Valid authenticated user account with permission to invoke the endpoint
  • Trigger point: File handling logic that renames or moves files from a temporary directory to a final destination
  • Why exploitation is possible: The server accepts user-controlled path components that are not normalized or constrained, allowing directory traversal sequences (e.g., ../) to influence the final destination of the renamed file

Why this happens

The core issue is the lack of robust path validation and authorization in the file rename logic inside /api/create-user.

User-supplied or indirectly controllable path segments are combined with server paths and passed directly to filesystem operations, permitting directory traversal beyond the intended upload area.

This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the application fails to verify that the resolved absolute path stays within a safe, predefined directory under application control.

Potential impact

  • Overwriting of critical application files that the process can write to
  • Placement of attacker-controlled files into executable or interpretable directories, which can lead to remote code execution
  • Unauthorized exposure or modification of configuration files and secrets
  • Corruption of application data or logs by moving or overwriting existing files
  • Escalation of impact if overwritten files are part of deployment, startup, or authentication flows

General mitigation guidance

Effective mitigation focuses on strict control of filesystem paths and limiting the privileges of file operations.

Recommended defensive patterns include:

  • Restricting all uploaded or temporary files to a dedicated directory and enforcing that final destinations remain within this directory or a small set of whitelisted paths
  • Normalizing and canonicalizing paths before use, then checking that their absolute form is still under the expected base directory
  • Treating all path fragments derived directly or indirectly from user input as untrusted and disallowing any traversal tokens or absolute path markers
  • Enforcing least privilege for the application process so it cannot modify code, configuration, or system directories even if a path validation flaw exists
  • Separating storage for executable/application code from user-controlled or runtime-writable directories

How teams detect issues like this

Path traversal weaknesses can often be identified through:

  • Static analysis rules that flag uses of filesystem APIs (rename, move, write) where arguments depend on HTTP parameters or request bodies without normalization and boundary checks
  • Code review practices that require explicit validation of any path derived from user input, including verification against a fixed base directory
  • Runtime logging and monitoring of unusual file operations, such as writes or renames into code directories, configuration paths, or other unexpected locations
  • Security testing and fuzzing focused on file-related endpoints, sending directory traversal patterns in filenames and path parameters to detect improper handling

Automated security scanners and SAST tools can help surface these patterns early in the development lifecycle when combined with clear secure coding guidelines.

Sources

SourceLink
github.comgithub.com/CC-T-454455/Vulnerabilities/tree/master/bookcars/vulnerability-17

Frequently asked

questions

Yes. Any authenticated user who can call the /api/create-user endpoint over the network may be able to exploit the file rename behavior, subject to application-specific access controls.

The attacker must have valid credentials and the ability to invoke the affected API. No direct filesystem or shell access is required; exploitation occurs through crafted HTTP requests that influence the destination path.

Constrain all file operations to a small set of server-controlled directories, canonicalize the requested path, and verify that the resolved path remains within an approved base directory before performing any rename or move. Avoid using raw user input as part of filesystem paths.

Establish a standard file-handling abstraction that enforces path normalization, directory whitelisting, and privilege separation by default, and require its use for all file-related features. Complement this with code review checklists and automated static analysis rules focused on path traversal and arbitrary file write behaviors.

Find out what's already
exploitable in your codebase.