Skip to content
Path traversal Write-up Intermediate

ImpressCMS <= 1.4.2 (image-edit.php) Path Traversal Vulnerability

The image-edit.php script in ImpressCMS 1.4.2 and earlier uses a user-supplied temporary image name in a file copy operation without sanitising path traversal sequences. An attacker could potentially read or write files outside the intended temporary directory.

karmainsecurity.com

Published on karmainsecurity.com

The vulnerability is located in the /libraries/image-editor/image-edit.php script:

The author, on karmainsecurity.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application fails to sanitise the $simage_temp parameter before using it in a file copy operation, allowing directory traversal sequences to escape the intended temporary folder.

What the attacker needed

Access to the image editor functionality

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is a path traversal bug. The program takes a filename from the user and uses it to copy a file, but it does not check that the filename stays inside the intended folder. By using special characters like '../', an attacker might make the program access files in other folders on the server.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.