Exploit the possiblities

WordPress Yoast SEO Cross Site Scripting

WordPress Yoast SEO Cross Site Scripting
Posted Nov 22, 2017
Authored by Dimopoulos Elias

WordPress Yoast SEO plugin versions prior to 5.8.0 suffer from a cross site scripting vulnerability.

tags | exploit, xss
advisories | CVE-2017-16842
MD5 | 978116d3607766290b34a2d7a3aed0e2

WordPress Yoast SEO Cross Site Scripting

Change Mirror Download
Discoverer:             Elias Dimopoulos
Linkedin: https://gr.linkedin.com/in/dimopouloselias

Vulnerability: Reflected XSS
Affected plugin: Yoast SEO plugin < 5.8.0
Active installations: 5+ million
URL: https://wordpress.org/plugins/wordpress-seo/#developers

Assigned CVE: CVE-2017-16842

-----------------------------------------------------------
Thanks Yoast for their immediate response.
-----------------------------------------------------------


The vulnerability lies in the "tab" parameter and can cause reflected
XSS vulnerability.

The vulnerability can be exploited against an administrator by using the
following url:

http://victim/wp-admin/admin.php?page=wpseo_search_console&tab=settings'><script>alert(window.location)</script><!--

The victim has to have a valid profile under
http://victim/wp-admin/admin.php?page=wpseo_search_console&tab=settings
(example: profile.png)
If there is the message "No profiles found" under the above link, the
plugin has not finished with the configuration and the vulnerability
cannot be exploited.

A logged in Administrator, who will click on the above link, he will
receive an alert box with the value of "window.location".

In this case, the javascript code is just an alert box, however any kind
of malicious javascript code can be used.

Reproduce:

1. Login to your wordpress as an admin.
2. Ensure that a valid profile has been configured under
http://victim/wp-admin/admin.php?page=wpseo_search_console&tab=settings
(example: profile.png)
3. Access the following link:

http://victim/wp-admin/admin.php?page=wpseo_search_console&tab=settings'><script>alert(window.location)</script><!--

4. The alert box should be executed.

The vulnerability has been tested against:

* Yoast SEO Version: 5.7.1
* WordPress 4.8.3 running Twenty Seventeen theme.
* Firefox 56.0 (64-bit) - Mozilla Firefox for Ubuntu canonical - 1.0


I also tried to track down the issue in the source code:

file: admin/google_search_console/class-gsc-platform-tabs.php:

70 private function set_current_tab( array $platforms ) {
71 $this->current_tab = key( $platforms );
72 if ( $current_platform = filter_input( INPUT_GET,
'tab' ) ) {
73 $this->current_tab = $current_platform;
74 }
75 }

file: wordpress-seo/admin/google_search_console/class-gsc-table.php:

361 echo "<input id='field_platform' type='hidden' name='platform'
value='{$platform}' />";

the filter_input function has the following definition:

mixed filter_input ( int $type , string $variable_name [, int $filter =
FILTER_DEFAULT [, mixed $options ]] )

If filter is omitted like in the code above, FILTER_DEFAULT will be
used, which is equivalent to FILTER_UNSAFE_RAW. This will result in no
filtering taking place by default. (ref:
http://php.net/manual/en/function.filter-input.php)

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

Want To Donate?


Bitcoin: 18PFeCVLwpmaBuQqd5xAYZ8bZdvbyEWMmU

File Archive:

February 2018

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Feb 1st
    15 Files
  • 2
    Feb 2nd
    15 Files
  • 3
    Feb 3rd
    15 Files
  • 4
    Feb 4th
    13 Files
  • 5
    Feb 5th
    16 Files
  • 6
    Feb 6th
    15 Files
  • 7
    Feb 7th
    15 Files
  • 8
    Feb 8th
    15 Files
  • 9
    Feb 9th
    18 Files
  • 10
    Feb 10th
    8 Files
  • 11
    Feb 11th
    8 Files
  • 12
    Feb 12th
    17 Files
  • 13
    Feb 13th
    15 Files
  • 14
    Feb 14th
    15 Files
  • 15
    Feb 15th
    17 Files
  • 16
    Feb 16th
    18 Files
  • 17
    Feb 17th
    37 Files
  • 18
    Feb 18th
    2 Files
  • 19
    Feb 19th
    16 Files
  • 20
    Feb 20th
    16 Files
  • 21
    Feb 21st
    15 Files
  • 22
    Feb 22nd
    16 Files
  • 23
    Feb 23rd
    31 Files
  • 24
    Feb 24th
    0 Files
  • 25
    Feb 25th
    0 Files
  • 26
    Feb 26th
    0 Files
  • 27
    Feb 27th
    0 Files
  • 28
    Feb 28th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2018 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close