VYPR
Unrated severityNVD Advisory· Published Jun 17, 2026

Typemill < 2.24.0 Path Traversal via ControllerApiImage::getPagemedia()

CVE-2026-49133

Description

Typemill before 2.24.0 contains a path traversal vulnerability that allows authenticated attackers with Author-level privileges to read arbitrary files outside the content directory by supplying traversal sequences in the path query parameter passed to Storage::getFile() with an empty folder argument. Attackers can bypass traversal-prevention controls in Storage::getFolderPath() to access sensitive files.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

1

Patches

Vulnerability mechanics

Root cause

"Missing path normalization and validation in `Storage::getFile()` allows traversal sequences to escape the content directory."

Attack vector

An authenticated attacker with Author-level privileges can supply traversal sequences (e.g., `../../`) in the `path` query parameter passed to `Storage::getFile()` while providing an empty `folder` argument. The old `getFolderPath()` method did not resolve symlinks or normalize the final path, so a crafted path like `../../../etc/passwd` would bypass the intended content-directory restriction. The attacker can then read arbitrary files on the server filesystem, such as configuration files or system secrets. This is a classic path traversal vulnerability [CWE-22].

Affected code

The vulnerability resides in `system/typemill/Models/Storage.php`, specifically in the `getFile()` method and the helper `getFolderPath()`. The patch introduces a new `validatePath()` method that uses `realpath()` to resolve the final path and checks that it starts with the allowed base directory, preventing traversal sequences from escaping the content folder. All file operations (`getFile`, `writeFile`, `deleteFile`, `renameFile`, `copyFile`, `checkFile`, `getFileTime`, `deleteFolder`, `deleteContentFolder`, `deleteContentFolderRecursive`) are hardened by routing through `validatePath()`.

What the fix does

The patch adds a private `validatePath()` method that calls `realpath()` on the concatenated folder+filename and checks that the resolved path starts with the allowed base directory. If the path cannot be resolved or escapes the base, the method returns `false` and sets an error message. Every file operation in `Storage.php` now calls `validatePath()` before acting on the path, and the old direct string concatenation (`$folderpath . $filename`) is replaced with the validated result. This ensures that traversal sequences like `../` are resolved and rejected, closing the path traversal hole.

Preconditions

  • authAttacker must have an authenticated session with at least Author-level privileges in Typemill.
  • configThe application must be running a version of Typemill before 2.24.0.
  • networkAttacker must be able to send HTTP requests to the Typemill instance (network access).
  • inputThe request must supply traversal sequences (e.g., `../../../etc/passwd`) in the path parameter with an empty folder argument.

Generated on Jun 18, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

3

News mentions

0

No linked articles in our index yet.