Skip to content
Path traversal Write-up Intermediate

LightBlog <= 9.9.2 Authentication Bypass / Local File Inclusion Vulnerability

The check_user.php script used a cookie value to decide which file to include without properly verifying it, so an attacker could traverse directories to include local files or bypass the login check. This allowed reading arbitrary local files and skipping authentication.

karmainsecurity.com

Published on karmainsecurity.com

The issue is due to user-suplpied input passed via the ‘Lightblogusername’ cookie to the checkuser.php script is not properly verified before being used to include files. This can be exploited to include arbitrary files from local resources via directory traversal attacks, or to bypass the authentication mechanism.

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 cookie value was concatenated into a file include path without validation, allowing directory traversal and control over the included file.

Impact

An attacker could include arbitrary local files and bypass the authentication mechanism, potentially exposing sensitive data or gaining unauthorised access.

What the attacker needed

Ability to send a crafted cookie

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.

A cookie is a small piece of data your browser sends back to a website on each request. This blog software took a value from a cookie and used it to pick a file to load, without checking it was safe, so someone could point it at other files on the server or trick the login check.

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.