/

CVE-2026-12198

Severity:

HIGH RISK

(7.3)

Path Traversal (CWE-22) in Microweber API Endpoint

CVE-2026-12198

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read / Filesystem Access

Severity:

HIGH RISK

(7.3)

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 Microweber up to version 2.0.20 allows attackers to manipulate the cache_path_relative parameter in the /api_nosession/thumbnail_img endpoint to influence filesystem paths.

When exploited remotely, this weakness may enable access to files outside the intended directory scope, depending on deployment configuration and server permissions.

Affected context

The vulnerability occurs in Microweber installations up to version 2.0.20 that expose the /api_nosession/thumbnail_img API endpoint.

The issue is tied to the userfiles_path handling, where the cache_path_relative argument influences how paths are constructed for file operations.

It becomes risky in environments where this endpoint is reachable over the network and the application runs with permissions to read sensitive files beyond the intended user files or cache directories.

Exploit preconditions

  • Attack surface: HTTP interface via the /api_nosession/thumbnail_img API endpoint.
  • Required access: Remote, unauthenticated or low-authenticated access (depending on configuration) to the endpoint accepting cache_path_relative.
  • Trigger point: Supplying crafted path components (e.g., sequences that traverse directories) through cache_path_relative so that the backend resolves paths outside the expected directory.
  • Why exploitation is possible: The server-side logic appears to trust the cache_path_relative input when building filesystem paths, without consistently normalizing, constraining, or validating it against an allowed base directory, allowing traversal outside the intended path.

Why this happens

This issue stems from improper restriction of filesystem paths derived from user-controlled input, aligning with CWE-22: Path Traversal.

The affected userfiles_path logic appears to concatenate or otherwise combine the cache_path_relative parameter with a base directory for file operations without robust canonicalization or enforcement of a fixed root.

As a result, attackers can craft values that navigate upward or sideways in the directory tree, causing the application to operate on files outside the intended storage area.

Potential impact

  • May allow reading files outside the intended userfiles or cache directory, depending on server permissions.
  • Could expose application configuration files, keys, or other sensitive data present on the filesystem.
  • Can potentially aid in reconnaissance that supports further exploitation of the host or application.
  • Might enable partial overwrite or file creation in writable directories, if the vulnerable code path is used for writing as well as reading.

General mitigation guidance

Mitigation typically focuses on constraining how user input influences filesystem paths and reducing the privileges of the code that handles such input.

Common defensive patterns include:

  • Enforcing strict canonicalization of user-supplied path segments and rejecting any that contain traversal elements or absolute paths.
  • Resolving requested paths against a fixed, known-safe base directory and explicitly verifying that the final normalized path remains within that directory.
  • Using whitelists or mapping identifiers to pre-defined directories or filenames instead of accepting raw path segments from clients.
  • Running the web application under an account with minimal filesystem privileges and limiting access to only the directories required for normal operation.
  • Separating user-controlled file storage from directories that contain configuration, code, and secrets, and applying OS-level access controls accordingly.

How teams detect issues like this

High-level detection approaches for this class of vulnerability include:

  • Static analysis rules that flag direct concatenation of user input into filesystem paths, especially in APIs like file open, read, write, or image processing utilities.
  • Code review checklists that call out any usage of "relative path" parameters or cache paths and require verification of canonicalization and base-directory checks.
  • Runtime application logging and monitoring for suspicious path patterns (e.g., sequences resembling directory traversal) in request parameters such as cache_path_relative.
  • Security testing (SAST/DAST) integrated into CI/CD pipelines that specifically probe endpoints using user-supplied paths for traversal behavior.

Sources

SourceLink
github.comgithub.com/microweber/microweber/
github.comgithub.com/microweber/microweber/issues/1172
github.comgithub.com/whuHouYF/microweber-vuldb-disclosure-2026/blob/991630c494a99c70a96e456992a04de2ecb5a1e1/reports/microweber-path-traversal.md
vuldb.comvuldb.com/cve/CVE-2026-12198
vuldb.comvuldb.com/submit/829596
vuldb.comvuldb.com/vuln/370841
vuldb.comvuldb.com/vuln/370841/cti

Frequently asked

questions

Yes. The flaw exists in an HTTP API endpoint and can typically be triggered remotely when the /api_nosession/thumbnail_img route is exposed over the network.

In many deployments, only the ability to send crafted requests to the vulnerable endpoint is required. Additional authentication may or may not be needed depending on how the endpoint is configured.

The safest approach is to treat any path-related input as untrusted, normalize and validate it against a strict allowed base directory, and reject any value that attempts to escape or reference unexpected locations.

Adopt secure file-handling patterns: avoid directly using user input in filesystem APIs, centralize path normalization and validation helpers, enforce least privilege at the OS level, and include specific checks for path traversal in code review and automated testing.

Find out what's already
exploitable in your codebase.