logo
DATABASE RESOURCES PRICING ABOUT US

Symantec Web Gateway upload_file Remote Code Execution Vulnerability

Description

The file-management scripts in the management GUI in Symantec Web Gateway 5.0.x before 5.0.3 allow remote attackers to upload arbitrary code to a designated pathname, and possibly execute this code, via unspecified vectors. **Recent assessments:** **wchen-r7** at September 12, 2019 6:07pm UTC reported: This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of Symantec Web Gateway. Authentication is not required to exploit this vulnerability. The specific flaw exists because Symantec Web Gateway allows unauthenticated users to upload a file while preserving the file extension. This allows users to upload additional script files that can be used to execute remote code from user supplied commands under the context of the webserver. ## Details **blocked_file** <?php include_once("config/conf.php"); include_once("config/db.php"); include_once("includes/util_functions.php"); if (isset($_POST['submitted'])) { $updated = true; unescape_form_vals(); // remove slashes form values as we are displaying only $new_image = $_FILES['new_image']; $before_filename = $_POST['before_filename']; $after_filename = $_POST['after_filename']; $image_query = "select value from mi5_blockpagemsg where name='image_name'"; $image_result = @mysql_query($image_query); $image_row = @mysql_fetch_assoc($image_result); $old_image_name = $image_row['value']; @mysql_free_result($image_result); $image_name = $old_image_name; $image_url = $upload_image_url . "/". $image_name; if ($new_image['error'] == UPLOAD_ERR_OK && $new_image['size'] > 0) // file is uploaded { $return_arr = upload_file($new_image, $upload_image_path_temp, "temp"); if ($return_arr['uploaded']) { $image_name = $return_arr['new_file_name']; $image_url = $upload_image_url_temp . "/". $image_name; } } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Blocked File Download</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="styles/mi5.css" /> </head> <body> <div id="mainContent"> <div id="mainText"> <?php if ($image_name == '') { $image_url = "images/mi5.gif"; } ?> <img src="<?php echo $image_url . "?t=".time(); ?>" alt="Symantec Defense Centre" style="border: 1px solid #ddd;" /> <hr noshade="noshade" size="1" style="margin-bottom: 10px;" /> <table><tr><!--<td valign="top" style="width: 120px;"> <p><a href="javascript:history.go(-1);">« Previous Page</a></p> </td>--> <td style="padding-left: 15px; border-left: 1px solid #999;"> <h3>Symantec Enterprise Spygate</h3> <h1>Downloading this file is prohibited</h1> <p><?php echo $before_filename; ?> %%File%%<?php echo $after_filename; ?></p> <p>If you think this spyware detection was in error, please click here.</p> </td></tr></table> </div> <div class="copyright">© Copyright 2004-2006, Symantec</div> </div> </body> </html> **blocked_url** <?php include_once("config/conf.php"); include_once("config/db.php"); include_once("includes/util_functions.php"); if (isset($_POST['submitted'])) { $updated = true; unescape_form_vals(); // remove slashes form values as we are displaying only $new_image = $_FILES['new_image']; $before_url = $_POST['before_url']; $after_url = $_POST['after_url']; $image_query = "select value from mi5_blockpagemsg where name='image_name'"; $image_result = @mysql_query($image_query); $image_row = @mysql_fetch_assoc($image_result); $old_image_name = $image_row['value']; @mysql_free_result($image_result); $image_name = $old_image_name; $image_url = $upload_image_url . "/". $image_name; if ($new_image['error'] == UPLOAD_ERR_OK && $new_image['size'] > 0) // file is uploaded { $return_arr = upload_file($new_image, $upload_image_path_temp, "temp"); if ($return_arr['uploaded']) { $image_name = $return_arr['new_file_name']; $image_url = $upload_image_url_temp . "/". $image_name; } } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Blocked URL</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="styles/mi5.css" /> </head> <body> <div id="mainContent"> <div id="mainText"> <?php if ($image_name == '') { $image_url = "images/mi5.gif"; } ?> <img src="<?php echo $image_url . "?t=".time(); ?>" alt="Symantec Defense Centre" style="border: 1px solid #ddd;" /> <hr noshade="noshade" size="1" style="margin-bottom: 10px;" /> <table><tr><!--<td valign="top" style="width: 120px;"> <p><a href="javascript:history.go(-1);">« Previous Page</a></p> </td>--> <td style="padding-left: 15px; border-left: 1px solid #999;"> <h3>Symantec Enterprise Spygate</h3> <h1>Accessing web pages from this URL is prohibited</h1> <p><?php echo $before_url; ?> %%URL%%<?php echo $after_url; ?></p> <p>If you think this spyware detection was in error, please click here.</p> </td></tr></table> </div> <div class="copyright">© Copyright 2004-2006, Symantec</div> </div> </body> </html> Assessed Attacker Value: 0 Assessed Attacker Value: 0Assessed Attacker Value: 0


Related