Skip to content
File upload Write-up Beginner

A Look At Cve 2015 6967

The Nibbleblog 'My Image' plugin did not validate the file extension of uploaded files, so an authenticated admin could upload a PHP script and execute commands on the server. The attacker could then run arbitrary system commands through the uploaded web shell.

Echo_Slow Follow

Published on systemweakness.com

As promised in my previous blog post, in this post, I’ll take a look at CVE-2015–6967, a file upload vulnerability affecting Nibbleblog version 4.0.3, and write a custom script to exploit it.

Echo_Slow, on systemweakness.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

The upload handler took the file extension from the user-supplied filename and saved the file without checking that it was an allowed image type.

Impact

An attacker with admin access could execute arbitrary commands on the server, leading to remote code execution.

What the attacker needed

Admin privileges on the blog

The fix

The vulnerability was fixed by adding a check that only allows jpg, gif, or png file extensions before uploading.

How it was found

  1. Log in to Nibbleblog with admin privileges.
  2. Use the 'My Image' plugin to upload a file named with a .php extension.
  3. Access the uploaded file at the predictable plugin path.
  4. Pass a command through the GET parameter named 'c' to execute it via the system function.

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 blog plugin let an admin upload a file but never checked what type of file it was. Because the server ran PHP files, an attacker with admin access could upload a PHP script and then ask the server to run commands through it. This is called remote code execution: the attacker can run their own commands on the server.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More by Echo_Slow

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.