Jump to content
htmanpro

Wordpress 4.1 - XSS & CSRF

Recommended Posts

Document Title:
===============
Wordpress 4.1 - XSS & CSRF Web Vulnerability

Release Date:
=============
2014-12-30

Product & Service Introduction:
===============================
https://wordpress.org/

Abstract Advisory Information:
==============================
The Hackyard Security Group pentest team discovered a cross site request forgery issue and a
cross site vulnerability in the Wordpress 4.1

Vulnerability Disclosure Timeline:
==================================
2014-12-27: Author Notification (0x0A)
2014-12-30: Public Disclosure

Discovery Status:
=================
Published

Affected Product(s):
====================
Product: Wordpress 4.1

Exploitation Technique:
=======================
Remote

Severity Level:
===============
Medium

Technical Details & Description:
================================
A client-side cross site request forgery issue and a cross site scripting vulnerability has been discovered in the Wordpress version 4.1
The client-side cross site request forgery vulnerability allows remote attackers to force client-side requests to execute application functions.
The client-side cross site scripting vulnerability allows remote attackers to inject malicious script codes to compromise administrator session data.

The XSS vulnerability is located in comment values of the wp-comments-post.php file POST method request.
Remote attackers are able to inject malicious script codes to the client-side application request.
The CSRF vulnerability is located in the same value request and allows to request the account session data.
Both issues are only exploitable on the client-side of the application and the request method to inject is POST.

The security risk of the client-side web vulnerability is estimated as medium with a CVSS (common vulnerability scoring system) count of 2.5.
Exploitation of the client-side web vulnerability requires no privileged web-application user account and low or medium user interaction.
Successful exploitation of the vulnerabilities result in non-persistent phishing mails, session hijacking, non-persistent external redirect to malicious sources and client-side manipulation of affected or connected module context.

Request Method(s):
[+] POST

Vulnerable Module(s):
[+] comment

Vulnerable Parameter(s):
[+] comment=

Affected Module(s):
[+] wp-comments-post.php


Proof of Concept (PoC):
=======================
The client-side cross site request forgery issue and a cross site scripting vulnerability can be exploited by remote attackers with low or medium user interaction.
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.

Manual steps to reproduce the vulnerabilities:
You can use the following exploit code to verify the vulnerability.
Save the code as .html.
The malicious page needs to be surfed by a non expired administrator session to take over the user session data.

PoC: wp-comments-post.php

<html>
<!-- CSRF PoC - generated by **0x0A** -->
<body>
<form action="http://127.0.0.1/wordpress/wp-comments-post.php" method="POST">
<input type="hidden" name="author" value="Pentest" />
<input type="hidden" name="email" value="pentest@hackyard.net"
/>
<input type="hidden" name="url" value="https://hackyard.net" />
<input type="alert" name="comment" value="<script>alert(document.cookie);</script>" />
<input id="submit" class="submit" type="submit" value="Post Comment" name="submit">
<input id="comment_post_ID" type="hidden" value="8" name="comment_post_ID">
<input id="comment_parent" type="hidden" value="0" name="comment_parent">
<input id="_wp_unfiltered_html_comment_disabled" type="hidden" value="d1a069167f" name="_wp_unfiltered_html_comment">
</form>
</body>
</html>


Reference(s):Video
======================
LINK: https://www.youtube.com/watch?v=UD-iwqphWlk
POC: https://www.youtube.com/watch?v=HL7ETe3A4Wg

Solution - Fix & Patch:
=======================
2014-11-24: Filtering an html comments

Security Risk:
==============
The security risk of the cross site request forgery and cross site scripting vulnerability is estimated as medium. (CVSS 2.5)

Credits & Authors:
==================
Neo Hapsis aka 0x0A- Information Security Researcher [https://hackyard.net]

Disclaimer & Information:
=========================
The information provided in this advisory is provided as it is without any warranty. Hackyard Security Group disclaims all
warranties, either expressed or implied, including the warranties of merchant ability and capability for a particular purpose.
Hackyard Security Group or its suppliers are not liable in any case of damage, including direct, indirect, incidental,
consequential loss of business profits or special damages, even if Hackyard Security Group or its suppliers have been advised of
the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or
incidental damages so the foregoing limitation may not apply. We do not approve or encourage anybody to
break any vendor licenses,policies, deface websites, hack into databases or trade with fraud/stolen material.

Domains: https://hackyard.net
Contact: admin@hackyard.net
Facebook: facebook.com/Hackyard.net
YouTube: youtube.com/user/HackyardSG


Any modified copy or reproduction, including partially usages, of this file requires authorization from Hackyard Security Group.
Permission to electronically redistribute this alert in its unmodified form is granted.
All other rights, including the use of other media, are reserved by Hackyard Security Group or its suppliers.
All pictures, texts, advisories, source code, videos and other information on this website is trademark of Hackyard Security Group & the specific authors or managers. To record, list (feed), modify, use or edit our material contact
(admin@hackyard.net) to get a permission.

Source: hk

Edited by htmanpro
Link to comment
Share on other sites

Pe RST nu a mers, si nu am facut nimic special. Imi facea strip la <script>. Am incercat si alti vectori si tot nu a mers.

Am mai incercat pe inca un blog si la fel, nu a mers.

PS: Nu va chinuiti sa incercati pe RST. wp-comments-post.php

$comment_content = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null;

in

$comment_content = ( isset($_POST['comment']) ) ? trim(htmlentities($_POST['comment'], ENT_QUOTES)) : null;

Edited by Nytro
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...