[Version <= 12.1.0] backend plugin can trigger remote comand execution #1387

Closed
opened 2026-10-05 00:41:56 +02:00 by adam · 0 comments
Owner

Yesterday I found xss in front-end, so I was wondering if the backend could execute the command

I found the place in the backend plugin that triggers command execution

first,we login into backend,and visit http://apupig.top/admin.php?page=plugins&tab=new

and download LocalFiles Editor

1

then click Activate it now

2

then click 1,2 in order, we will visit http://xxx.xxx/admin.php?page=plugin-LocalFilesEditor

3

we type ,then click save file

system($_POST[1]);

4

we can find detail in plugins/LocalFilesEditor/admin.php

5

it just uses the function stripslashes to handle parameters without filtering dangerous functions

so we can rce!

6

Yesterday I found xss in front-end, so I was wondering if the backend could execute the command I found the place in the backend plugin that triggers command execution first,we login into backend,and visit `http://apupig.top/admin.php?page=plugins&tab=new` and download `LocalFiles Editor` ![1](https://user-images.githubusercontent.com/56486273/146290244-5b3d0eb0-3cc4-4898-b1a1-105613a28bf3.png) then click `Activate it now` ![2](https://user-images.githubusercontent.com/56486273/146290256-476240c5-6965-40d6-9991-14f08b086482.png) then click 1,2 in order, we will visit `http://xxx.xxx/admin.php?page=plugin-LocalFilesEditor` ![3](https://user-images.githubusercontent.com/56486273/146290262-95f0aa75-5a3a-4508-98e5-5511e5804cd9.png) we type ,then click save file ```php system($_POST[1]); ``` ![4](https://user-images.githubusercontent.com/56486273/146290270-1857e2c2-6346-487a-9325-e419366b6084.png) we can find detail in `plugins/LocalFilesEditor/admin.php` ![5](https://user-images.githubusercontent.com/56486273/146290284-26a517b9-ed01-4c42-93ca-db968e474f2a.png) it just uses the function `stripslashes` to handle parameters without filtering dangerous functions so we can rce! ![6](https://user-images.githubusercontent.com/56486273/146290304-30538b7c-da9c-4093-9e49-d459173e2237.png) <!-- github-sync-id:1081673770 -->
adam closed this issue 2026-10-05 00:41:56 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1387