code
stringlengths
12
2.05k
label
int64
0
1
programming_language
stringclasses
9 values
cwe_id
stringlengths
6
14
cwe_name
stringlengths
5
103
description
stringlengths
36
1.23k
url
stringlengths
36
48
label_name
stringclasses
2 values
self::removeLevel($kid->id); } }
0
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
function clean_input_value($value) { if (is_string($value)) { return descript($value); } if (is_array($value)) { return array_map('descript', $value); } return ''; }
0
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
public function renderAttribute ($name) { switch ($name) { case 'name': echo $this->relatedModel->getLink (/*array ( 'class' => 'quick-read-link', 'data-id' => $this->relatedModel->id, 'data-class' => get_class ($this->relatedModel), 'data-name' => CHtml::encode ($this->relatedModel->name), )*/); break; case 'relatedModelName': echo $this->getRelatedModelName (); break; case 'assignedTo': echo $this->relatedModel->renderAttribute ('assignedTo'); break; case 'label': echo $this->getLabel (); break; case 'createDate': echo X2Html::dynamicDate ($this->relatedModel->createDate); break; } }
0
PHP
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
foreach ($page as $pageperm) { if (!empty($pageperm['manage'])) return true; }
1
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
foreach($return as $index => $value) { if(! is_string($value)) $return[$index] = $defaultvalue; elseif($addslashes) $return[$index] = mysql_real_escape_string($value); }
1
PHP
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
function form_confirm_buttons($action_url, $cancel_url) { global $config; ?> <tr> <td align='right'> <input type='button' onClick='cactiReturnTo("<?php print htmlspecialchars($config['url_path'] . $cancel_url, ENT_QUOTES);?>")' value='<?php print __esc('Cancel');?>'> <input type='button' onClick='cactiReturnTo("<?php print htmlspecialchars($config['url_path'] . $action_url . '&confirm=true', ENT_QUOTES);?>")' value='<?php print __esc('Delete');?>'> </td> </tr> <?php }
1
PHP
NVD-CWE-noinfo
null
null
null
safe
$criteria->addCondition (" $userCondition OR user IN ( SELECT DISTINCT b.username FROM x2_group_to_user a JOIN x2_group_to_user b ON a.groupId=b.groupId WHERE a.username=:getAccessCriteria_username ) OR ( associationType='User' AND associationId in ( SELECT DISTINCT b.id FROM x2_group_to_user a JOIN x2_group_to_user b ON a.groupId=b.groupId WHERE a.userId=:getAccessCriteria_userId ) )"); } else { // default history privacy (public or assigned) $criteria->addCondition (" $userCondition OR visibility=1 "); } } if ($profile) { $criteria->params[':getAccessCriteria_profileUsername'] = $profile->username; /* only show events associated with current profile which current user has permission to see */ $criteria->addCondition ("user=:getAccessCriteria_profileUsername"); if (!Yii::app()->params->isAdmin) { $criteria->addCondition ("visibility=1"); } } return $criteria; }
1
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
public function manage_messages() { expHistory::set('manageable', $this->params); $page = new expPaginator(array( 'model'=>'order_status_messages', 'where'=>1, 'limit'=>10, 'order'=>'body', 'page'=>(isset($this->params['page']) ? $this->params['page'] : 1), 'controller'=>$this->params['controller'], 'action'=>$this->params['action'], //'columns'=>array('Name'=>'title') )); //eDebug($page); assign_to_template(array( 'page'=>$page )); }
0
PHP
CWE-74
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/74.html
vulnerable
foreach ($fields as $field) { $fieldName = $field->fieldName; if ($field->type == 'date' || $field->type == 'dateTime') { if (is_numeric($record->$fieldName)) $record->$fieldName = Formatter::formatLongDateTime($record->$fieldName); }elseif ($field->type == 'link') { $name = $record->$fieldName; if (!empty($field->linkType)) { list($name, $id) = Fields::nameAndId($name); } if (!empty($name)) $record->$fieldName = $name; }elseif ($fieldName == 'visibility') { switch ($record->$fieldName) { case 0: $record->$fieldName = 'Private'; break; case 1: $record->$fieldName = 'Public'; break; case 2: $record->$fieldName = 'User\'s Groups'; break; default: $record->$fieldName = 'Private'; } } }
1
PHP
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
private function catchWarning ($errno, $errstr, $errfile, $errline) { $this->error[] = array( 'error' => "Connecting to the POP3 server raised a PHP warning: ", 'errno' => $errno, 'errstr' => $errstr ); }
0
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
public static function dropdown($vars){ if(is_array($vars)){ //print_r($vars); $name = $vars['name']; $where = "WHERE "; if(isset($vars['type'])) { $where .= " `type` = '{$vars['type']}' AND "; }else{ $where .= " "; } $where .= " `status` = '1' "; $order_by = "ORDER BY "; if(isset($vars['order_by'])) { $order_by .= " {$vars['order_by']} "; }else{ $order_by .= " `name` "; } if (isset($vars['sort'])) { $sort = " {$vars['sort']}"; }else{ $sort = 'ASC'; } } $cat = Db::result("SELECT * FROM `posts` {$where} {$order_by} {$sort}"); $num = Db::$num_rows; $drop = "<select name=\"{$name}\" class=\"form-control\"><option></option>"; if($num > 0){ foreach ($cat as $c) { # code... // if($c->parent == ''){ if(isset($vars['selected']) && $c->id == $vars['selected']) $sel = "SELECTED"; else $sel = ""; $drop .= "<option value=\"{$c->id}\" $sel style=\"padding-left: 10px;\">{$c->title}</option>"; // foreach ($cat as $c2) { // # code... // if($c2->parent == $c->id){ // if(isset($vars['selected']) && $c2->id == $vars['selected']) $sel = "SELECTED"; else $sel = ""; // $drop .= "<option value=\"{$c2->id}\" $sel style=\"padding-left: 10px;\">&nbsp;&nbsp;&nbsp;{$c2->name}</option>"; // } // } // } } } $drop .= "</select>"; return $drop; }
0
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
public function redirect($url) { if (trim($url) == '') { return false; } $url = str_ireplace('Location:', '', $url); $url = trim($url); $redirectUrl = site_url(); $parseUrl = parse_url($url); if (isset($parseUrl['host'])) { if ($parseUrl['host'] == site_hostname()) { $redirectUrl = $url; } } $redirectUrl = str_replace("\r", "", $redirectUrl); $redirectUrl = str_replace("\n", "", $redirectUrl); $clearInput = new HTMLClean(); $redirectUrl = $clearInput->clean($redirectUrl); if (headers_sent()) { echo '<meta http-equiv="refresh" content="0;url=' . $redirectUrl . '">'; } else { return \Redirect::to($redirectUrl); } }
1
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function edit_externalalias() { $section = isset($this->params['id']) ? $this->section->find($this->params['id']) : new section($this->params); if ($section->parent == -1) { notfoundController::handle_not_found(); exit; } // doesn't work for standalone pages if (empty($section->id)) { $section->public = 1; if (!isset($section->parent)) { // This is another precaution. The parent attribute // should ALWAYS be set by the caller. //FJD - if that's the case, then we should die. notfoundController::handle_not_authorized(); exit; //$section->parent = 0; } } assign_to_template(array( 'section' => $section, 'glyphs' => self::get_glyphs(), )); }
0
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
function productFeed() { // global $db; //check query password to avoid DDOS /* * condition = new * description * id - SKU * link * price * title * brand - manufacturer * image link - fullsized image, up to 10, comma seperated * product type - category - "Electronics > Audio > Audio Accessories MP3 Player Accessories","Health & Beauty > Healthcare > Biometric Monitors > Pedometers" */ $out = '"id","condition","description","like","price","title","brand","image link","product type"' . chr(13) . chr(10); $p = new product(); $prods = $p->find('all', 'parent_id=0 AND '); //$prods = $db->selectObjects('product','parent_id=0 AND'); }
1
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
private function remove() { array_splice($this->tokens, $this->t, 1); }
1
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
static function description() { return gt("Places navigation links/menus on the page."); }
1
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
}elseif($vars['paging'] < $limit || $vars['paging'] = $limit ){ $prev = ($vars['paging'])-1; if($smart == true){ $url = $vars['url']."/paging/".$prev; }else{ $url = $vars['url']."&paging=".$prev; } $r .= "<li class=\"pull-left\"><a href=\"{$url}\">Previous</a></li>"; }
0
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
public function testVerbatimThenEof() { $parser = new JBBCode\Parser(); $parser->addBBCode('verbatim', '{param}', false, false); $parser->parse('[verbatim]'); $this->assertEquals('', $parser->getAsHtml()); }
1
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function json_encode($value, $options = 0, $depth = 512) { $json = \json_encode($value, $options, $depth); if (JSON_ERROR_NONE !== json_last_error()) { throw new \InvalidArgumentException( 'json_encode error: ' . json_last_error_msg()); } return $json; }
1
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
$tag[] = '<a href="'.Url::tag($t)."\">{$t}</a>"; } $tag = implode(', ', $tag); return $title.' : '.$tag; }
1
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
public static function simple($input) { return empty($str) ? '' : pts_strings::keep_in_string($input, pts_strings::CHAR_LETTER | pts_strings::CHAR_NUMERIC | pts_strings::CHAR_DASH | pts_strings::CHAR_DECIMAL | pts_strings::CHAR_SPACE | pts_strings::CHAR_UNDERSCORE | pts_strings::CHAR_COMMA | pts_strings::CHAR_AT | pts_strings::CHAR_COLON); }
0
PHP
CWE-352
Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.
https://cwe.mitre.org/data/definitions/352.html
vulnerable
public static function restoreX2AuthManager () { if (isset (self::$_oldAuthManagerComponent)) { Yii::app()->setComponent ('authManager', self::$_oldAuthManagerComponent); } else { throw new CException ('X2AuthManager component could not be restored'); } }
0
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
public static function deactivate($mod){ $mods = Options::v('modules'); $mods = json_decode($mods, true); if (!is_array($mods) || $mods == "") { $mods = array(); } //print_r($mods); $arr = ""; for ($i=0;$i<count($mods);$i++) { # code... if ($mods[$i] == $mod) { //unset($mods[$i]); }else{ $arr[] = $mods[$i]; } } //print_r($arr); //asort($mods); $mods = json_encode($arr); $mods = Options::update('modules', $mods); if($mods){ new Options(); return true; }else{ return false; } }
0
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
$logo = "<img src=\"".self::$url.Options::v('logo')."\" style=\"width: $width; height: $height; margin: 1px;\">"; }else{ $logo = "<span class=\"mg genixcms-logo\"></span>"; } return $logo; }
0
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
$banner->increaseImpressions(); } } // assign banner to the template and show it! assign_to_template(array( 'banners'=>$banners )); }
0
PHP
CWE-74
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/74.html
vulnerable
public function approve() { expHistory::set('editable', $this->params); /* The global constants can be overriden by passing appropriate params */ //sure wish I could do this once in the constructor. sadly $this->params[] isn't set yet // $require_login = empty($this->params['require_login']) ? COMMENTS_REQUIRE_LOGIN : $this->params['require_login']; // $require_approval = empty($this->params['require_approval']) ? COMMENTS_REQUIRE_APPROVAL : $this->params['require_approval']; // $require_notification = empty($this->params['require_notification']) ? COMMENTS_REQUIRE_NOTIFICATION : $this->params['require_notification']; // $notification_email = empty($this->params['notification_email']) ? COMMENTS_NOTIFICATION_EMAIL : $this->params['notification_email']; if (empty($this->params['id'])) { flash('error', gt('No ID supplied for comment to approve')); expHistory::back(); } $comment = new expComment($this->params['id']); assign_to_template(array( 'comment'=>$comment )); }
0
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
$pass = ps('p_password'); if (trim($pass) === '') { $message = array(gTxt('password_required'), E_ERROR); } else { $hash = gps('hash'); $selector = substr($hash, SALT_LENGTH); $tokenInfo = safe_row("reference_id, token, expires", 'txp_token', "selector = '".doSlash($selector)."' AND type='password_reset'"); if ($tokenInfo) { if (strtotime($tokenInfo['expires']) <= time()) { $message = array(gTxt('token_expired'), E_ERROR); } else { $uid = assert_int($tokenInfo['reference_id']); $row = safe_row("name, email, nonce, pass AS old_pass", 'txp_users', "user_id = $uid"); if ($row['nonce'] && ($hash === bin2hex(pack('H*', substr(hash(HASHING_ALGORITHM, $row['nonce'].$selector.$row['old_pass']), 0, SALT_LENGTH))).$selector)) { if (change_user_password($row['name'], $pass)) { $body = gTxt('greeting').' '.$row['name'].','.n.n.gTxt('password_change_confirmation'); txpMail($row['email'], "[$sitename] ".gTxt('password_changed'), $body); $message = gTxt('password_changed'); // Invalidate all reset requests in the wild for this user. safe_delete("txp_token", "reference_id = $uid AND type = 'password_reset'"); } } else { $message = array(gTxt('invalid_token'), E_ERROR); } } } else { $message = array(gTxt('invalid_token'), E_ERROR); } } } $txp_user = ''; return $message; }
1
PHP
CWE-521
Weak Password Requirements
The product does not require that users should have strong passwords, which makes it easier for attackers to compromise user accounts.
https://cwe.mitre.org/data/definitions/521.html
safe
public function delete_item_permissions_check( $request ) { $term = $this->get_term( $request['id'] ); if ( is_wp_error( $term ) ) { return $term; } if ( ! current_user_can( 'delete_term', $term->term_id ) ) { return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete this term.' ), array( 'status' => rest_authorization_required_code() ) ); } return true; }
1
PHP
NVD-CWE-noinfo
null
null
null
safe
public function confirm() { $task = $this->getTask(); $comment = $this->getComment(); $this->response->html($this->template->render('comment/remove', array( 'comment' => $comment, 'task' => $task, 'title' => t('Remove a comment') ))); }
0
PHP
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
vulnerable
$form .= "<option value='".$advertiser['clientid']."'>".htmlspecialchars(MAX_buildName($advertiser['clientid'], $advertiser['clientname']))."</option>"; } $form .= "</select><input type='image' class='submit' src='" . OX::assetPath() . "/images/".$GLOBALS['phpAds_TextDirection']."/go_blue.gif'></form>"; addPageFormTool($GLOBALS['strMoveTo'], 'iconTrackerMove', $form); //delete $deleteConfirm = phpAds_DelConfirm($GLOBALS['strConfirmDeleteTracker']); addPageLinkTool($GLOBALS["strDelete"], MAX::constructUrl(MAX_URL_ADMIN, "tracker-delete.php?token=" . urlencode(phpAds_SessionGetToken()) . "&clientid=".$advertiserId."&trackerid=".$trackerId."&returnurl=advertiser-trackers.php"), "iconDelete", null, $deleteConfirm); addPageShortcut($GLOBALS['strBackToTrackers'], MAX::constructUrl(MAX_URL_ADMIN, "advertiser-trackers.php?clientid=$advertiserId"), "iconBack"); }
0
PHP
CWE-352
Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.
https://cwe.mitre.org/data/definitions/352.html
vulnerable
function showByModel() { global $order, $template, $db; expHistory::set('viewable', $this->params); $product = new product(); $model = $product->find("first", 'model="' . expString::escape($this->params['model']) . '"'); //eDebug($model); $product_type = new $model->product_type($model->id); //eDebug($product_type); $tpl = $product_type->getForm('show'); if (!empty($tpl)) $template = new controllertemplate($this, $tpl); //eDebug($template); $this->grabConfig(); // grab the global config assign_to_template(array( 'config' => $this->config, 'product' => $product_type, 'last_category' => $order->lastcat )); }
1
PHP
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
function delete_recurring() { $item = $this->event->find('first', 'id=' . $this->params['id']); if ($item->is_recurring == 1) { // need to give user options expHistory::set('editable', $this->params); assign_to_template(array( 'checked_date' => $this->params['date_id'], 'event' => $item, )); } else { // Process a regular delete $item->delete(); } }
0
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
function manage() { expHistory::set('viewable', $this->params); // $category = new storeCategory(); // $categories = $category->getFullTree(); // // // foreach($categories as $i=>$val){ // // if (!empty($this->values) && in_array($val->id,$this->values)) { // // $this->tags[$i]->value = true; // // } else { // // $this->tags[$i]->value = false; // // } // // $this->tags[$i]->draggable = $this->draggable; // // $this->tags[$i]->checkable = $this->checkable; // // } // // $obj = json_encode($categories); }
0
PHP
CWE-74
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/74.html
vulnerable
public function getAuthority() { if (empty($this->host)) { return ''; } $authority = $this->host; if (!empty($this->userInfo)) { $authority = $this->userInfo . '@' . $authority; } if ($this->isNonStandardPort($this->scheme, $this->host, $this->port)) { $authority .= ':' . $this->port; } return $authority; }
0
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
public function getViewFileParams () { if (!isset ($this->_viewFileParams)) { $this->_viewFileParams = array_merge ( parent::getViewFileParams (), array ( 'chartType' => $this->chartType, 'chartSettingsDataProvider' => self::getChartSettingsProvider ( $this->chartType), 'eventTypes' => array ('all'=>Yii::t('app', 'All Events')) + Events::$eventLabels, 'socialSubtypes' => Dropdowns::getSocialSubtypes (), 'visibilityFilters' => array ( '1'=>'Public', '0'=>'Private', ), 'suppressChartSettings' => false, 'chartType' => 'usersChart', 'widgetUID' => $this->widgetUID, 'metricTypes' => User::getUserOptions (), ) ); } return $this->_viewFileParams; }
1
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
public static function object_votes_by_webuser($object, $object_id, $orderby='date desc', $offset=0, $limit=PHP_INT_MAX) { global $DB; global $website; $DB->queryLimit('wuv.id AS id, wuv.date AS date, wuv.webuser AS webuser, wu.username AS username', 'nv_webuser_votes wuv, nv_webusers wu', ' wuv.website = '.protect($website->id).' AND wuv.object = '.protect($object).' AND wuv.object_id = '.protect($object_id).' AND wu.id = wuv.webuser', $orderby, $offset, $limit); return array($DB->result(), $DB->foundRows()); }
0
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
function XMLRPCgetResourceGroups($type) { global $user; $resources = getUserResources(array("groupAdmin"), array("manageGroup"), 1); if(array_key_exists($type, $resources)) { return array('status' => 'success', 'groups' => $resources[$type]); } else { return array('status' => 'error', 'errorcode' => 73, 'errormsg' => 'invalid resource group type'); } }
1
PHP
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
public function save_change_password() { global $user; $isuser = ($this->params['uid'] == $user->id) ? 1 : 0; if (!$user->isAdmin() && !$isuser) { flash('error', gt('You do not have permissions to change this users password.')); expHistory::back(); } if (($isuser && empty($this->params['password'])) || (!empty($this->params['password']) && $user->password != user::encryptPassword($this->params['password']))) { flash('error', gt('The current password you entered is not correct.')); expHistory::returnTo('editable'); } //eDebug($user); $u = new user(intval($this->params['uid'])); $ret = $u->setPassword($this->params['new_password1'], $this->params['new_password2']); //eDebug($u, true); if (is_string($ret)) { flash('error', $ret); expHistory::returnTo('editable'); } else { $params = array(); $params['is_admin'] = !empty($u->is_admin); $params['is_acting_admin'] = !empty($u->is_acting_admin); $u->update($params); } if (!$isuser) { flash('message', gt('The password for') . ' ' . $u->username . ' ' . gt('has been changed.')); } else { $user->password = $u->password; flash('message', gt('Your password has been changed.')); } expHistory::back(); }
1
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
public function save() { $project = $this->getProject(); $values = $this->request->getValues(); list($valid, $errors) = $this->categoryValidator->validateCreation($values); if ($valid) { if ($this->categoryModel->create($values) !== false) { $this->flash->success(t('Your category have been created successfully.')); $this->response->redirect($this->helper->url->to('CategoryController', 'index', array('project_id' => $project['id'])), true); return; } else { $errors = array('name' => array(t('Another category with the same name exists in this project'))); } } $this->create($values, $errors); }
0
PHP
CWE-639
Authorization Bypass Through User-Controlled Key
The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.
https://cwe.mitre.org/data/definitions/639.html
vulnerable
public function getSigFigs($n) { $n = ltrim($n, '0+-'); $dp = strpos($n, '.'); // decimal position if ($dp === false) { $sigfigs = strlen(rtrim($n, '0')); } else { $sigfigs = strlen(ltrim($n, '0.')); // eliminate extra decimal character if ($dp !== 0) $sigfigs--; } return $sigfigs; }
1
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
public static function validateByRegex($path, $values, $regex) { if (!isset($values[$path])) { return ''; } $result = preg_match($regex, Util::requestString($values[$path])); return array($path => ($result ? '' : __('Incorrect value!'))); }
1
PHP
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
safe
public function testCanConstructWithBody() { $r = new Response(200, [], 'baz'); $this->assertInstanceOf('Psr\Http\Message\StreamInterface', $r->getBody()); $this->assertSame('baz', (string) $r->getBody()); }
1
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
$that->assertSame($existing, Request::getTrustedProxies()); $that->assertsame('10.0.0.1', $backendRequest->getClientIp()); });
1
PHP
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
} elseif ($token->name == 'param') { $nest = count($this->currentNesting) - 1; if ($nest >= 0 && $this->currentNesting[$nest]->name === 'object') { $i = count($this->objectStack) - 1; if (!isset($token->attr['name'])) { $token = false; return; } $n = $token->attr['name']; // We need this fix because YouTube doesn't supply a data // attribute, which we need if a type is specified. This is // *very* Flash specific. if (!isset($this->objectStack[$i]->attr['data']) && ($token->attr['name'] == 'movie' || $token->attr['name'] == 'src')) { $this->objectStack[$i]->attr['data'] = $token->attr['value']; } // Check if the parameter is the correct value but has not // already been added if ( !isset($this->paramStack[$i][$n]) && isset($this->addParam[$n]) && $token->attr['name'] === $this->addParam[$n] ) { // keep token, and add to param stack $this->paramStack[$i][$n] = true; } elseif (isset($this->allowedParam[$n])) { // keep token, don't do anything to it // (could possibly check for duplicates here) } else { $token = false; } } else { // not directly inside an object, DENY! $token = false; } }
1
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
protected function parse() { parent::parse(); // grab the error-type from the parameters $errorType = $this->getParameter('type'); // set correct headers switch($errorType) { case 'module-not-allowed': case 'action-not-allowed': SpoonHTTP::setHeadersByCode(403); break; case 'not-found': SpoonHTTP::setHeadersByCode(404); break; } // querystring provided? if($this->getParameter('querystring') !== null) { // split into file and parameters $chunks = explode('?', $this->getParameter('querystring')); // get extension $extension = SpoonFile::getExtension($chunks[0]); // if the file has an extension it is a non-existing-file if($extension != '' && $extension != $chunks[0]) { // set correct headers SpoonHTTP::setHeadersByCode(404); // give a nice error, so we can detect which file is missing echo 'Requested file (' . implode('?', $chunks) . ') not found.'; // stop script execution exit; } } // assign the correct message into the template $this->tpl->assign('message', BL::err(SpoonFilter::toCamelCase(htmlspecialchars($errorType), '-'))); }
0
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function setCACertificate($caFile) { if (is_file($caFile)) { $this->_caFile = $caFile; } else { throw new ClientException('Could not open CA certificate: ' . $caFile); } }
1
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
public function get($config) { return false; }
1
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
public function __construct($site) { // If the REST API Proxy Plugin isn't active, always use the current site. if(! PMB_REST_PROXY_EXISTS){ $site = ''; } $this->setSite($site); $this->getSiteInfo(); }
0
PHP
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
private function getElementCategory($node) { $name = $node->tagName; if(in_array($name, $this->special)) return self::SPECIAL; elseif(in_array($name, $this->scoping)) return self::SCOPING; elseif(in_array($name, $this->formatting)) return self::FORMATTING; else return self::PHRASING; }
1
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
public function rename() { if (!AuthUser::hasPermission('file_manager_rename')) { Flash::set('error', __('You do not have sufficient permissions to rename this file or directory.')); redirect(get_url('plugin/file_manager/browse/')); } // CSRF checks if (isset($_POST['csrf_token'])) { $csrf_token = $_POST['csrf_token']; if (!SecureToken::validateToken($csrf_token, BASE_URL.'plugin/file_manager/rename')) { Flash::set('error', __('Invalid CSRF token found!')); redirect(get_url('plugin/file_manager/browse/')); } } else { Flash::set('error', __('No CSRF token found!')); redirect(get_url('plugin/file_manager/browse/')); } $data = $_POST['file']; $data['current_name'] = str_replace('..', '', $data['current_name']); $data['new_name'] = str_replace('..', '', $data['new_name']); // Clean filenames $data['new_name'] = preg_replace('/ /', '_', $data['new_name']); $data['new_name'] = preg_replace('/[^a-z0-9_\-\.]/i', '', $data['new_name']); $path = substr($data['current_name'], 0, strrpos($data['current_name'], '/')); $file = FILES_DIR . '/' . $data['current_name']; // Check another file doesn't already exist with same name if (file_exists(FILES_DIR . '/' . $path . '/' . $data['new_name'])) { Flash::set('error', __('A file or directory with that name already exists!')); redirect(get_url('plugin/file_manager/browse/' . $path)); } if (file_exists($file)) { if (!rename($file, FILES_DIR . '/' . $path . '/' . $data['new_name'])) Flash::set('error', __('Permission denied!')); } else { Flash::set('error', __('File or directory not found!' . $file)); } redirect(get_url('plugin/file_manager/browse/' . $path)); }
0
PHP
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
public function remove() { $this->checkCSRFParam(); $project = $this->getProject(); $swimlane_id = $this->request->getIntegerParam('swimlane_id'); if ($this->swimlaneModel->remove($project['id'], $swimlane_id)) { $this->flash->success(t('Swimlane removed successfully.')); } else { $this->flash->failure(t('Unable to remove this swimlane.')); } $this->response->redirect($this->helper->url->to('SwimlaneController', 'index', array('project_id' => $project['id']))); }
0
PHP
CWE-639
Authorization Bypass Through User-Controlled Key
The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.
https://cwe.mitre.org/data/definitions/639.html
vulnerable
private function closeCell() { /* If the stack of open elements has a td or th element in table scope, then act as if an end tag token with that tag name had been seen. */ foreach(array('td', 'th') as $cell) { if($this->elementInScope($cell, true)) { $this->inCell(array( 'name' => $cell, 'type' => HTML5::ENDTAG )); break; } } }
1
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
public function edit() { if((isset($this->params['id']))) $record = new address(intval($this->params['id'])); else $record = null; $config = ecomconfig::getConfig('address_allow_admins_all'); assign_to_template(array( 'record'=>$record, 'admin_config'=>$config )); if (expSession::get('customer-signup')) { assign_to_template(array( 'checkout'=>true )); } }
0
PHP
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
vulnerable
public function reset() { return $this->sendCommand('RSET', 'RSET', 250); }
1
PHP
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function array_replace_recursive($array, $array1) { function recurse($array, $array1) { foreach ($array1 as $key => $value) { // create new key in $array, if it is empty or not an array if (!isset($array[$key]) || (isset($array[$key]) && !is_array($array[$key]))) { $array[$key] = array(); } // overwrite the value in the base array if (is_array($value)) { $value = recurse($array[$key], $value); } $array[$key] = $value; } return $array; } // handle the arguments, merge one by one $args = func_get_args(); $array = $args[0]; if (!is_array($array)) { return $array; } for ($i = 1; $i < count($args); $i++) { if (is_array($args[$i])) { $array = recurse($array, $args[$i]); } } return $array; }
0
PHP
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
vulnerable
function edit_internalalias() { $section = isset($this->params['id']) ? $this->section->find($this->params['id']) : new section($this->params); if ($section->parent == -1) { notfoundController::handle_not_found(); exit; } // doesn't work for standalone pages if (empty($section->id)) { $section->public = 1; if (!isset($section->parent)) { // This is another precaution. The parent attribute // should ALWAYS be set by the caller. //FJD - if that's the case, then we should die. notfoundController::handle_not_authorized(); exit; //$section->parent = 0; } } assign_to_template(array( 'section' => $section, 'glyphs' => self::get_glyphs(), )); }
1
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
function manage() { expHistory::set('viewable', $this->params); // $category = new storeCategory(); // $categories = $category->getFullTree(); // // // foreach($categories as $i=>$val){ // // if (!empty($this->values) && in_array($val->id,$this->values)) { // // $this->tags[$i]->value = true; // // } else { // // $this->tags[$i]->value = false; // // } // // $this->tags[$i]->draggable = $this->draggable; // // $this->tags[$i]->checkable = $this->checkable; // // } // // $obj = json_encode($categories); }
1
PHP
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
function XMLRPCaddNode($nodeName, $parentNode) { require_once(".ht-inc/privileges.php"); global $user; if(! is_numeric($parentNode)) { return array('status' => 'error', 'errorcode' => 78, 'errormsg' => 'Invalid nodeid specified'); } if(in_array("nodeAdmin", $user['privileges'])) { $nodeInfo = getNodeInfo($parentNode); if(is_null($tmp)) { return array('status' => 'error', 'errorcode' => 78, 'errormsg' => 'Invalid nodeid specified'); } if(! validateNodeName($nodeName, $tmp)) { return array('status' => 'error', 'errorcode' => 81, 'errormsg' => 'Invalid node name'); } if(checkUserHasPriv("nodeAdmin", $user['id'], $parentNode)) { $query = "SELECT id " . "FROM privnode " . "WHERE name = '$nodeName' AND parent = $parentNode"; $qh = doQuery($query); if(mysql_num_rows($qh)) { return array('status' => 'error', 'errorcode' => 82, 'errormsg' => 'A node of that name already exists under ' . $nodeInfo['name']); } $query = "INSERT IGNORE INTO privnode " . "(parent, name) " . "VALUES " . "($parentNode, '$nodeName')"; doQuery($query); $qh = doQuery("SELECT LAST_INSERT_ID() FROM privnode", 101); if(! $row = mysql_fetch_row($qh)) { return array('status' => 'error', 'errorcode' => 85, 'errormsg' => 'Could not add node to database'); } $nodeid = $row[0]; return array('status' => 'success', 'nodeid' => $nodeid); } else { return array('status' => 'error', 'errorcode' => 49, 'errormsg' => 'Unable to add node at this location'); } } else { return array('status' => 'error', 'errorcode' => 70, 'errormsg' => 'User cannot access node content'); } }
1
PHP
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
function clickOnFileInput () { document.getElementById("upfile").click(); }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
setup: function () { var data = this.model.get('data') || {}; this.emailId = data.emailId; this.emailName = data.emailName; if ( this.parentModel && (this.model.get('parentType') == this.parentModel.name && this.model.get('parentId') == this.parentModel.id) ) { if (this.model.get('post')) { this.createField('post', null, null, 'views/stream/fields/post'); this.hasPost = true; } if ((this.model.get('attachmentsIds') || []).length) { this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple'); this.hasAttachments = true; } } this.messageData['email'] = '<a href="#Email/view/' + data.emailId + '">' + data.emailName + '</a>'; this.messageName = 'emailReceived'; if (data.isInitial) { this.messageName += 'Initial'; } if (data.personEntityId) { this.messageName += 'From'; this.messageData['from'] = '<a href="#'+data.personEntityType+'/view/' + data.personEntityId + '">' + data.personEntityName + '</a>'; } if (this.model.get('parentType') === data.personEntityType && this.model.get('parentId') == data.personEntityId) { this.isThis = true; } if (this.isThis) { this.messageName += 'This'; } this.createMessage(); },
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function extractProtocol(address, location) { address = trimLeft(address); location = location || {}; var match = protocolre.exec(address); var protocol = match[1] ? match[1].toLowerCase() : ''; var rest = match[2] ? match[2] + match[3] : match[3]; var slashes = !!(match[2] && match[2].length >= 2); if (protocol === 'file:') { if (slashes) { rest = rest.slice(2); } } else if (isSpecial(protocol)) { rest = match[3]; } else if (protocol) { if (rest.indexOf('//') === 0) { rest = rest.slice(2); } } else if (slashes && location.hostname) { rest = match[3]; } return { protocol: protocol, slashes: slashes, rest: rest }; }
1
JavaScript
CWE-601
URL Redirection to Untrusted Site ('Open Redirect')
A web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a Redirect. This simplifies phishing attacks.
https://cwe.mitre.org/data/definitions/601.html
safe
function copyType(source) { switch (toString.call(source)) { case "[object Int8Array]": case "[object Int16Array]": case "[object Int32Array]": case "[object Float32Array]": case "[object Float64Array]": case "[object Uint8Array]": case "[object Uint8ClampedArray]": case "[object Uint16Array]": case "[object Uint32Array]": return new source.constructor( copyElement(source.buffer), source.byteOffset, source.length ); case "[object ArrayBuffer]": // Support: IE10 if (!source.slice) { // If we're in this case we know the environment supports ArrayBuffer /* eslint-disable no-undef */ var copied = new ArrayBuffer(source.byteLength); new Uint8Array(copied).set(new Uint8Array(source)); /* eslint-enable */ return copied; } return source.slice(0); case "[object Boolean]": case "[object Number]": case "[object String]": case "[object Date]": return new source.constructor(source.valueOf()); case "[object RegExp]": var re = new RegExp( source.source, source.toString().match(/[^\/]*$/)[0] ); re.lastIndex = source.lastIndex; return re; case "[object Blob]": return new source.constructor([source], { type: source.type }); } if (isFunction(source.cloneNode)) { return source.cloneNode(true); } }
1
JavaScript
CWE-74
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/74.html
safe
function md(a,b,c) {var d=a+" ";switch(c) {case"m":return b?"jedna minuta":"jedne minute";case"mm":return d+=1===a?"minuta":2===a||3===a||4===a?"minute":"minuta";case"h":return b?"jedan sat":"jednog sata";case"hh":return d+=1===a?"sat":2===a||3===a||4===a?"sata":"sati";case"dd":return d+=1===a?"dan":"dana";case"MM":return d+=1===a?"mjesec":2===a||3===a||4===a?"mjeseca":"mjeseci";case"yy":return d+=1===a?"godina":2===a||3===a||4===a?"godine":"godina"}}function nd(a,b,c,d) {var e=a;switch(c) {case"s":return d||b?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(d||b?" perc":" perce");case"mm":return e+(d||b?" perc":" perce");case"h":return"egy"+(d||b?" óra":" órája");case"hh":return e+(d||b?" óra":" órája");case"d":return"egy"+(d||b?" nap":" napja");case"dd":return e+(d||b?" nap":" napja");case"M":return"egy"+(d||b?" hónap":" hónapja");case"MM":return e+(d||b?" hónap":" hónapja");case"y":return"egy"+(d||b?" év":" éve");case"yy":return e+(d||b?" év":" éve")}return""}function od(a) {return(a?"":"[múlt] ")+"["+ug[this.day()]+"] LT[-kor]"}
1
JavaScript
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
r=g.isEventsEnabled();g.setEventsEnabled(!1);var q=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,b);var u=this.graph.cellRenderer.redraw,x=g.states;a=g.scale;if(this.clipping){var A=new mxRectangle((f.x+t.x)*a,(f.y+t.y)*a,f.width*a/p,f.height*a/p),E=this;this.graph.cellRenderer.redraw=function(D,B,v){if(null!=D){var y=x.get(D.cell);if(null!=y&&(y=g.getBoundingBox(y,!1),null!=y&&0<y.width&&0<y.height&&!mxUtils.intersects(A,y))||!E.isCellVisible(D.cell))return}u.apply(this, arguments)}}a=null;try{var C=[this.getRoot()];a=new mxTemporaryCellStates(g,c,C,null,mxUtils.bind(this,function(D){return this.getLinkForCellState(D)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)C=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Progress.prototype.draw = function(ctx){ try { var percent = Math.min(this.percent, 100) , size = this._size , half = size / 2 , x = half , y = half , rad = half - 1 , fontSize = this._fontSize; ctx.font = fontSize + 'px ' + this._font; var angle = Math.PI * 2 * (percent / 100); ctx.clearRect(0, 0, size, size); // outer circle ctx.strokeStyle = '#9f9f9f'; ctx.beginPath(); ctx.arc(x, y, rad, 0, angle, false); ctx.stroke(); // inner circle ctx.strokeStyle = '#eee'; ctx.beginPath(); ctx.arc(x, y, rad - 1, 0, angle, true); ctx.stroke(); // text var text = this._text || (percent | 0) + '%' , w = ctx.measureText(text).width; ctx.fillText( text , x - w / 2 + 1 , y + fontSize / 2 - 1); } catch (ex) {} //don't fail if we can't render progress return this; };
0
JavaScript
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
function openExternal(url) { //Only open http(s), mailto, tel, and callto links if (allowedUrls.test(url)) { shell.openExternal(url); } }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
var P=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),K=new Editor,F=null,H=null,S=null,V=!1,M=[],W=null,U=null;this.getSelectedItem=function(){null!=H&&n(H);return H};if(null==y("#mxODPickerCss")){var X=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");X.appendChild(u);u.type="text/css";u.id="mxODPickerCss";u.appendChild(document.createTextNode(G))}b.innerHTML=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
C(null,null,f.constructor!=DriveLibrary)}catch(E){x(E)}}else this.ui.editor.graph.reset(),q({message:mxResources.get("readOnly")})}catch(E){x(E)}};DriveClient.prototype.insertFile=function(f,c,m,n,v,d,g){d=null!=d?d:this.xmlMimeType;f={mimeType:d,title:f};null!=m&&(f.parents=[{kind:"drive#fileLink",id:m}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,g),mxUtils.bind(this,function(k){d==this.libraryMimeType?n(new DriveLibrary(this.ui,c,k)):0==k?null!=v&&v({message:mxResources.get("errorSavingFile")}): n(new DriveFile(this.ui,c,k))}),v)};DriveClient.prototype.createUploadRequest=function(f,c,m,n,v,d,g){v=null!=v?v:!1;var k={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=d&&(k["If-Match"]=d);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:k,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
scope.findPirate = function (pirate) { return Array.prototype.slice.call(arguments); };
0
JavaScript
CWE-74
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/74.html
vulnerable
this._onInfoResponse = (responses) => { const callback = this._cb; if (callback) { this._cb = undefined; callback(responses); } };
1
JavaScript
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/78.html
safe
return ka}function B(){function fa(ta,ka){var Ja=mxResources.get(ta);null==Ja&&(Ja=ta.substring(0,1).toUpperCase()+ta.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"&hellip;");return Ja+" ("+ka.length+")"}function sa(ta,ka,Ja){mxEvent.addListener(ka,"click",function(){Ha!=ka&&(Ha.style.backgroundColor="",Ha=ka,Ha.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,Ma=Ja?Ba[ta][Ja]:oa[ta],V=null,O(!1))})}Fa&&(Fa=!1,mxEvent.addListener(Z,"scroll",function(ta){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Tooltip.prototype.hide = function (callback) { var that = this var $tip = $(this.$tip) var e = $.Event('hide.bs.' + this.type) function complete() { if (that.hoverState != 'in') $tip.detach() that.$element .removeAttr('aria-describedby') .trigger('hidden.bs.' + that.type) callback && callback() } this.$element.trigger(e) if (e.isDefaultPrevented()) return $tip.removeClass('in') $.support.transition && $tip.hasClass('fade') ? $tip .one('bsTransitionEnd', complete) .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : complete() this.hoverState = null return this }
0
JavaScript
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
(function(){var a={};CKEDITOR.addTemplate=function(e,b){var c=a[e];if(c)return c;c={name:e,source:b};CKEDITOR.fire("template",c);return a[e]=new CKEDITOR.template(c.source)};CKEDITOR.getTemplate=function(e){return a[e]}})();(function(){var a=[];CKEDITOR.addCss=function(e){a.push(e)};CKEDITOR.getCss=function(){return a.join("\n")}})();CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")});CKEDITOR.TRISTATE_ON=1;CKEDITOR.TRISTATE_OFF=2;
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(u){var D=this.graph.getCustomFonts();if(0<D.length){var K=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(K.join(""),u)}),Q=0;Q<D.length;Q++)mxUtils.bind(this,function(R,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(T++,this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedGoogleFonts[Y]=ba;K.push(ba+"\n");T--;N()}),mxUtils.bind(this,function(ba){T--;K.push("@import url("+ Y+");\n");N()}))):K.push(this.cachedGoogleFonts[Y]+"\n"):K.push('@font-face {font-family: "'+R+'";src: url("'+Y+'")}\n')})(D[Q].name,D[Q].url);N()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var D=document.getElementsByTagName("style"),K=0;K<D.length;K++){var T=mxUtils.getTextContent(D[K]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&u[0].appendChild(D[K].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,D){D=null!=
1
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
function checkPosition(pos, name) { if (!Number.isSafeInteger(pos)) { validateNumber(pos, name); if (!Number.isInteger(pos)) throw new ERR_OUT_OF_RANGE(name, 'an integer', pos); throw new ERR_OUT_OF_RANGE(name, '>= 0 and <= 2 ** 53 - 1', pos); } if (pos < 0) throw new ERR_OUT_OF_RANGE(name, '>= 0 and <= 2 ** 53 - 1', pos); }
1
JavaScript
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/78.html
safe
'"')):void 0!==Q&&E.push(Q);return""});/,\s*$/.test(u)&&E.push("");return E};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"=== u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var E=u.convert,J=this;u.convert=function(T){if(null!=T){var N="http://"==T.substring(0,7)||"https://"==T.substring(0,8);N&&!navigator.onLine?T=Editor.svgBrokenImage.src:!N||T.substring(0,u.baseUrl.length)==u.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=E.apply(this,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(b){var a=/^on([A-Z]\w+)/,d,e=function(a,b,c,d){a.on("formLoaded",function(){a.getInputElement().on(c,d,a)})},c;for(c in b)if(d=c.match(a))this.eventProcessors[c]?this.eventProcessors[c].call(this,this._.dialog,b[c]):e(this,this._.dialog,d[1].toLowerCase(),b[c]);return this},reset:function(){function b(){d.$.open();var b="";e.size&&(b=e.size-(CKEDITOR.env.ie?7:0));var i=a.frameId+"_input";
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
return na}function C(){function oa(pa,na){var Ka=mxResources.get(pa);null==Ka&&(Ka=pa.substring(0,1).toUpperCase()+pa.substring(1));18<Ka.length&&(Ka=Ka.substring(0,18)+"&hellip;");return Ka+" ("+na.length+")"}function sa(pa,na,Ka){mxEvent.addListener(na,"click",function(){Fa!=na&&(Fa.style.backgroundColor="",Fa=na,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ka?Aa[pa][Ka]:Ca[pa],W=null,O(!1))})}Ga&&(Ga=!1,mxEvent.addListener(Z,"scroll",function(pa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
this.startDrawing=function(){t(!0)};this.isDrawing=function(){return y};var z=mxUtils.bind(this,function(K){if(c){var F=d.length,H=A&&0<v.length&&null!=d&&2>d.length;H||v.push.apply(v,d);d=[];v.push(null);m.push(c);c=null;(H||l)&&this.stopDrawing();l&&2<=F&&this.startDrawing();mxEvent.consume(K)}}),L=new mxCell;L.edge=!0;var C=function(){var K=b.getCurrentCellStyle(L);K=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var t=b.diagramContainer;p.style.top=t.offsetTop-g+"px";p.style.left=t.offsetLeft-g+"px";p.style.width=(f?0:t.offsetWidth)+g+"px";p.style.height=(f?t.offsetHeight:0)+g+"px"}function n(t,z,L){if(null!=v)return t;var C;return function(){var D=this,G=arguments,P=L&&!C;clearTimeout(C);C=setTimeout(function(){C=null;L||t.apply(D,G)},z);P&&t.apply(D,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
customColsBuild = function() { var cols = ''; for (var i = 0; i < customCols.length; i++) { cols += '<td class="elfinder-col-'+customCols[i]+'">{' + customCols[i] + '}</td>'; } return cols; },
1
JavaScript
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
CR: function() { if (isatty) { exports.cursor.deleteLine(); exports.cursor.beginningOfLine(); } else { process.stdout.write('\r'); } }
1
JavaScript
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
destroy() { this._sock && this._sock.writable && this._sock.destroy(); return this; }
1
JavaScript
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/78.html
safe
authPasswdChg(prompt) { if (!this._server) throw new Error('Server-only method called in client mode'); const promptLen = Buffer.byteLength(prompt); let p = this._packetRW.write.allocStart; const packet = this._packetRW.write.alloc(1 + 4 + promptLen + 4); packet[p] = MESSAGE.USERAUTH_PASSWD_CHANGEREQ; writeUInt32BE(packet, promptLen, ++p); packet.utf8Write(prompt, p += 4, promptLen); writeUInt32BE(packet, 0, p += promptLen); // Empty language tag this._debug && this._debug('Outbound: Sending USERAUTH_PASSWD_CHANGEREQ'); sendPacket(this, this._packetRW.write.finalize(packet)); }
1
JavaScript
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/78.html
safe
Runner.prototype.hook = function(name, fn){ var suite = this.suite , hooks = suite['_' + name] , self = this , timer; function next(i) { var hook = hooks[i]; if (!hook) return fn(); if (self.failures && suite.bail()) return fn(); self.currentRunnable = hook; hook.ctx.currentTest = self.test; self.emit('hook', hook); hook.on('error', function(err){ self.failHook(hook, err); }); hook.run(function(err){ hook.removeAllListeners('error'); var testError = hook.error(); if (testError) self.fail(self.test, testError); if (err) { self.failHook(hook, err); // stop executing hooks, notify callee of hook err return fn(err); } self.emit('hook end', hook); delete hook.ctx.currentTest; next(++i); }); } Runner.immediately(function(){ next(0); }); };
0
JavaScript
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
function(u,D,K){if(null!=D){var T=function(Q){if(null!=Q)if(K)for(var R=0;R<Q.length;R++)D[Q[R].name]=Q[R];else for(var Y in D){var ba=!1;for(R=0;R<Q.length;R++)if(Q[R].name==Y&&Q[R].type==D[Y].type){ba=!0;break}ba||delete D[Y]}},N=this.editorUi.editor.graph.view.getState(u);null!=N&&null!=N.shape&&(N.shape.commonCustomPropAdded||(N.shape.commonCustomPropAdded=!0,N.shape.customProperties=N.shape.customProperties||[],N.cell.vertex?Array.prototype.push.apply(N.shape.customProperties,Editor.commonVertexProperties):
1
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
1;if(f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$block)&&f.getAttribute("contenteditable")=="false"){c.setStartAt(f,CKEDITOR.POSITION_BEFORE_START);c.setEndAt(f,CKEDITOR.POSITION_AFTER_END)}else c.moveToPosition(f,e[b?1:0])}}else d=1;d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,true)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!= CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(false,true),c=CKEDITOR.dom.walker.whitespaces(true);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(J){k=J};this.setAutoScroll=function(J){m=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){z=J};this.setSmoothing=function(J){l=J};this.setPerfectFreehandMode=function(J){M=J};this.setBrushSize=function(J){L.size=J};this.getBrushSize=function(){return L.size};var n=function(J){x=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
f.setCellStyles(mxConstants.STYLE_ROTATION,Number(I.value),[e[t]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(t){13==t.keyCode&&O.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(O)):(n.appendChild(O),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(E){for(E=document.elementFromPoint(E.clientX,
1
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
removeCustomField: function removeCustomField({ _id }) { check(_id, String) checkAuthentication(this) if (!CustomFields.findOne({ _id })) { throw new Meteor.Error('error-custom-field-not-found', 'Custom field not found', { method: 'removeCustomField' }) } CustomFields.remove({ _id }) },
0
JavaScript
CWE-285
Improper Authorization
The software does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.
https://cwe.mitre.org/data/definitions/285.html
vulnerable
f.appendChild(m);f.appendChild(l);k.appendChild(f);var q=c,v,x,A=function(n,y,K,B){var F="data:"==n.substring(0,5);!b.isOffline()||F&&"undefined"===typeof chrome?0<n.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(n,function(G){b.spinner.stop();b.hideDialog();var N=!1===B?1:null!=y&&null!=K?Math.max(y/G.width,K/G.height):Math.min(1,Math.min(520/G.width,520/G.height));t&&(n=b.convertDataUri(n));d(n,Math.round(Number(G.width)*N),Math.round(Number(G.height)*N),q,v,x)}, function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(n,null,null,q,v,x)):(n=b.convertDataUri(n),y=null==y?120:y,K=null==K?100:K,b.hideDialog(),d(n,y,K,q,v,x))},z=function(n,y){if(null!=n){var K=u?null:g.getModel().getGeometry(g.getSelectionCell());null!=K?A(n,K.width,K.height,y):A(n,null,null,y)}else b.hideDialog(),d(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
instanceConfig: $.extend({}, config) }); } });
1
JavaScript
CWE-1236
Improper Neutralization of Formula Elements in a CSV File
The software saves user-provided information into a Comma-Separated Value (CSV) file, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as a command when the file is opened by spreadsheet software.
https://cwe.mitre.org/data/definitions/1236.html
safe
function F(){};
0
JavaScript
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
vulnerable
"80px";mxUtils.setPrefixedStyle(m.style,"transform","translate(50%,-50%)");n.appendChild(m);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=x||(A=mxUtils.button(mxResources.get("copy"),function(P){P=b.base64ToBlob(L,"image/png");P=new ClipboardItem({"image/png":P,"text/html":new Blob(['<img src="data:'+x+";base64,"+L+'">'],{type:"text/html"})});navigator.clipboard.write([P]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(K){b.handleError(K)}))}),
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
f.appendChild(e);this.container=f},NewDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,q,v,x,A,z,L){function M(pa){null!=pa&&(Fa=xa=pa?135:140);pa=!0;if(null!=Ma)for(;H<Ma.length&&(pa||0!=mxUtils.mod(H,30));){var sa=Ma[H++];sa=K(sa.url,sa.libs,sa.title,sa.tooltip?sa.tooltip:sa.title,sa.select,sa.imgUrl,sa.info,sa.onClick,sa.preview,sa.noImg,sa.clibs);pa&&sa.click();pa=!1}}function n(){if(Y&&null!=v)l||b.hideDialog(),v(Y,ha,E.value);else if(d)l||b.hideDialog(),d(O,E.value,da,T);else{var pa=E.value;null!=pa&& 0<pa.length&&b.pickFolder(b.mode,function(sa){b.createFile(pa,O,null!=T&&0<T.length?T:null,null,function(){b.hideDialog()},null,sa,null,null!=P&&0<P.length?P:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function y(pa,sa,ya,va,ra,wa,fa){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");U.removeAttribute("disabled");O=sa;T=ya;P=wa;R=pa;Y=va;da=fa;ha=ra;R.style.backgroundColor=c;R.style.border=e}function K(pa,sa,ya,va,ra,wa,fa,ca,
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
null==na.viewState&&null==na.root&&u.updatePageRoot(na);null!=na.viewState&&(la=na.viewState.pageVisible,qa=na.viewState.mathEnabled,Ka=na.viewState.background,Ia=na.viewState.backgroundImage,ca.extFonts=na.viewState.extFonts);null!=Ia&&null!=Ia.originalSrc&&(Ia=u.createImageForPageLink(Ia.originalSrc,na));ca.background=Ka;ca.backgroundImage=null!=Ia?new mxImage(Ia.src,Ia.width,Ia.height,Ia.x,Ia.y):null;ca.pageVisible=la;ca.mathEnabled=qa;var Ra=ca.getGraphBounds;ca.getGraphBounds=function(){var Ja= Ra.apply(this,arguments),Oa=this.backgroundImage;if(null!=Oa&&null!=Oa.width&&null!=Oa.height){var Pa=this.view.translate,Qa=this.view.scale;Ja=mxRectangle.fromRectangle(Ja);Ja.add(new mxRectangle((Pa.x+Oa.x)*Qa,(Pa.y+Oa.y)*Qa,Oa.width*Qa,Oa.height*Qa))}return Ja};var Sa=ca.getGlobalVariable;ca.getGlobalVariable=function(Ja){return"page"==Ja?na.getName():"pagenumber"==Ja?pa+1:"pagecount"==Ja?null!=u.pages?u.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ca.container);u.updatePageRoot(na);
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var e=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft= "8px";k.appendChild(n);k.appendChild(u);e.appendChild(k);g.appendChild(e);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,F,K){C=this.createCellOption(C,F,K);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),A=mxUtils.bind(this,function(C,F,K){d=b.getSelectionState();n.innerHTML="";u.innerHTML="";m=n;d.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);d.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);d.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW, 0);d.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});A();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};
0
JavaScript
CWE-94
Improper Control of Generation of Code ('Code Injection')
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
https://cwe.mitre.org/data/definitions/94.html
vulnerable
function addEntryHandler(cat, entry, subCat) { mxEvent.addListener(entry, 'click', function() { if (currentEntry != entry) { currentEntry.style.backgroundColor = ''; currentEntry = entry; currentEntry.style.backgroundColor = leftHighlight; div.scrollTop = 0; div.innerHTML = ''; i0 = 0; templates = subCat? subCategories[cat][subCat] : categories[cat]; oldTemplates = null; addTemplates(false); } }); };
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
if(jQuery)(function(jQuery){jQuery.extend(jQuery.fn,{uploadify:function(options){jQuery(this).each(function(){settings=jQuery.extend({id:jQuery(this).attr('id'),uploader:'uploadify.swf',script:'uploadify.php',expressInstall:null,folder:'',height:30,width:110,cancelImg:'cancel.png',wmode:'opaque',scriptAccess:'sameDomain',fileDataName:'Filedata',method:'POST',queueSizeLimit:999,simUploadLimit:1,queueID:false,displayData:'percentage',onInit:function(){},onSelect:function(){},onQueueFull:function(){},onCheck:function(){},onCancel:function(){},onError:function(){},onProgress:function(){},onComplete:function(){},onAllComplete:function(){}},options);var pagePath=location.pathname;pagePath=pagePath.split('/');pagePath.pop();pagePath=pagePath.join('/')+'/';var data={};data.uploadifyID=settings.id;data.pagepath=pagePath;if(settings.buttonImg)data.buttonImg=escape(settings.buttonImg);if(settings.buttonText)data.buttonText=escape(settings.buttonText);if(settings.rollover)data.rollover=true;data.script=settings.script;data.folder=escape(settings.folder);if(settings.scriptData){var scriptDataString='';for(var name in settings.scriptData){scriptDataString+='&'+name+'='+settings.scriptData[name];}
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable