Skip to content
File upload Write-up Intermediate

WordPress Plugin VikBooking <= 1.5.3 Unauthorized RCE 漏洞細節

The VikBooking WordPress plugin allowed an unauthenticated attacker to write arbitrary files by abusing the signature upload feature, where the content type was taken from user input and used in the file path. This could lead to remote code execution by writing a web shell.

tech-blog.cymetrics.io

Published on tech-blog.cymetrics.io

前陣子在看一些 WordPress Plugin 的東西,發現是個滿好練習的地方,因為那邊 plugin 數量很多,而且每一個都有原始碼可以看,想要黑箱白箱都可以,然後安裝也很方便。

The author, on tech-blog.cymetrics.io

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

What the attacker needed

A confirmed booking with valid sid and ts; ability to send HTTP requests

The fix

The plugin was fixed in version 1.5.4 by using a regular expression to strictly validate the content type and extract only the image extension.

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.

The plugin lets customers upload a signature image. It checked only that the text contained 'image/png' and then used the rest of that text as the file extension. By adding path traversal characters, an attacker could make the plugin write a file anywhere on the server, including a PHP script that runs commands.

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.

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.