CVE-2015-10127 (published 2023-12-26T17:15Z)

A vulnerability was found in PlusCaptcha Plugin up to 2.0.6 on WordPress and classified as problematic. Affected by this issue is some unknown functionality. The manipulation leads to cross site scripting. The attack may be launched remotely. Upgrading to version 2.0.14 is able to address this issue. The patch is identified as 1274afc635170daafd38306487b6bb8a01f78ecd. It is recommended to upgrade the affected component. VDB-248954 is the identifier assigned to this vulnerability.

CVSS v3 base score: 6.1, MEDIUM (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N)

Weakness information:
cwe_id: CWE-79
cwe_name: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
description: The product 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.
extended_description: 
            Cross-site scripting (XSS) vulnerabilities occur when:
            
               Untrusted data enters a web application, typically from a web request.
               The web application dynamically generates a web page that contains this untrusted data.
               During page generation, the application does not prevent the data from containing content that is executable by a web browser, such as JavaScript, HTML tags, HTML attributes, mouse events, Flash, ActiveX, etc.
               A victim visits the generated web page through a web browser, which contains malicious script that was injected using the untrusted data.
               Since the script comes from a web page that was sent by the web server, the victim's web browser executes the malicious script in the context of the web server's domain.
               This effectively violates the intention of the web browser's same-origin policy, which states that scripts in one domain should not be able to access resources or run code in a different domain.
            
            There are three main kinds of XSS:
            
               
                  Type 1: Reflected XSS (or Non-Persistent) - 
         			The server reads data directly from the HTTP request and reflects it back in the HTTP response. Reflected XSS exploits occur when an attacker causes a victim to supply dangerous content to a vulnerable web application, which is then reflected back to the victim and executed by the web browser. The most common mechanism for delivering malicious content is to include it as a parameter in a URL that is posted publicly or e-mailed directly to the victim. URLs constructed in this manner constitute the core of many phishing schemes, whereby an attacker convinces a victim to visit a URL that refers to a vulnerable site. After the site reflects the attacker's content back to the victim, the content is executed by the victim's browser.
               
                  Type 2: Stored XSS (or Persistent) - 
               The application stores dangerous data in a database, message forum, visitor log, or other trusted data store. At a later time, the dangerous data is subsequently read back into the application and included in dynamic content. From an attacker's perspective, the optimal place to inject malicious content is in an area that is displayed to either many users or particularly interesting users. Interesting users typically have elevated privileges in the application or interact with sensitive data that is valuable to the attacker. If one of these users executes malicious content, the attacker may be able to perform privileged operations on behalf of the user or gain access to sensitive data belonging to the user. For example, the attacker might inject XSS into a log message, which might not be handled properly when an administrator views the logs.
            
               
                  Type 0: DOM-Based XSS - 
               In DOM-based XSS, the client performs the injection of XSS into the page; in the other types, the server performs the injection. DOM-based XSS generally involves server-controlled, trusted script that is sent to the client, such as Javascript that performs sanity checks on a form before the user submits it. If the server-supplied script processes user-supplied data and then injects it back into the web page (such as with dynamic HTML), then DOM-based XSS is possible.
            
            
            Once the malicious script is injected, the attacker can perform a variety of malicious activities. The attacker could transfer private information, such as cookies that may include session information, from the victim's machine to the attacker. The attacker could send malicious requests to a web site on behalf of the victim, which could be especially dangerous to the site if the victim has administrator privileges to manage that site. Phishing attacks could be used to emulate trusted web sites and trick the victim into entering a password, allowing the attacker to compromise the victim's account on that web site. Finally, the script could exploit a vulnerability in the web browser itself possibly taking over the victim's machine, sometimes referred to as "drive-by hacking."
            In many cases, the attack can be launched without the victim even being aware of it. Even with careful users, attackers frequently use a variety of methods to encode the malicious portion of the attack, such as URL encoding or Unicode, so the request looks less suspicious.
         
         

Fix information:
repo_url: https://github.com/wp-plugins/pluscaptcha
commit_details: repo_url: https://github.com/wp-plugins/pluscaptcha
author: PlusCaptcha
author_date: 2015-02-19 12:22:01+00:00
msg: Solver XSS

git-svn-id: https://plugins.svn.wordpress.org/pluscaptcha/trunk@1094241 b8457f37-d9ea-0310-8a92-e5e31aec5664
repository: repo_url: https://github.com/wp-plugins/pluscaptcha
repo_name: wp-plugins/pluscaptcha
description: WordPress.org Plugin Mirror
repo_language: PHP
owner: wp-plugins
file_changes: filename: PlusCaptcha.php
change_type: ModificationType.MODIFY
diff: @@ -3,7 +3,7 @@
 Plugin Name: PlusCaptcha
 Plugin URI: http://www.pluscaptcha.com/
 Description: The Easiest Captcha to Setup and Execute, with Auto-Setup Feature! Forget ugly and complicated captchas! Unique! <strong>TRUSTED BY +27 THOUSAND OF WEBSITES, BLOGS, E-COMMERCE AND GOVERNMENT SITES AROUND WORLD WIDE!</strong> Free Full Service with <strong>24/7 emergency support</strong> ( <a href="mailto:emergency@pluscaptcha.com">emergency@pluscaptcha.com</a> ) plus, with continuously updates and support! Questions? <a href="http://www.pluscaptcha.com/contacto">contact us!</a>
-Version: 2.0.6
+Version: 2.0.14
 Author: PlusCaptcha
 Author URI: http://www.pluscaptcha.com/
 License: GNU GPL2
@@ -29,6 +29,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 		- Denis, CEO PlusCaptcha
 */
 
+if (!function_exists('tags')) {
+	# Clean
+	# Limpiar data
+	function tags($tags){  
+		$tags = strip_tags($tags);  
+		$tags = stripslashes($tags);  
+		$tags = htmlentities($tags);
+		$tags = addslashes($tags);
+		return trim($tags);  
+	}
+}
+
 /* Ocultar errores */
 require_once(ABSPATH . 'wp-settings.php');
 error_reporting(0);

programming_language: PHP
filename: comment-form-inline-errors.php
change_type: ModificationType.MODIFY
diff: @@ -47,7 +47,7 @@ if (!class_exists('wpCommentFormInlineErrors')){
 
         function handleWpError($message, $title='', $args=array())
         {
-            if(!is_admin() && !empty($_POST['comment_post_ID']) && is_numeric($_POST['comment_post_ID'])){
+            if(!is_admin() && tags(!empty($_POST['comment_post_ID'])) && tags(is_numeric($_POST['comment_post_ID']))){
                 $_SESSION['formError'] = $message;
                 $denied = array('submit', 'comment_post_ID', 'comment_parent');
                 foreach($_POST as $key => $value){
@@ -56,7 +56,7 @@ if (!class_exists('wpCommentFormInlineErrors')){
                     }
                 }
                 session_write_close();
-                wp_safe_redirect(get_permalink($_POST['comment_post_ID']) . '#formError', 302);
+                wp_safe_redirect(get_permalink(tags($_POST['comment_post_ID'])) . '#formError', 302);
                 exit;
             } else {
                 _default_wp_die_handler($message, $title, $args);

programming_language: PHP
filename: admin.php
change_type: ModificationType.MODIFY
diff: @@ -1,14 +1,16 @@
 <?php
 
-# Clean
-# Limpiar data
-function tags($tags){  
-	$tags = strip_tags($tags);  
-	$tags = stripslashes($tags);  
-	$tags = htmlentities($tags);
-	$tags = addslashes($tags);
-	return trim($tags);  
-} 
+if (!function_exists('tags')) {
+	# Clean
+	# Limpiar data
+	function tags($tags){  
+		$tags = strip_tags($tags);  
+		$tags = stripslashes($tags);  
+		$tags = htmlentities($tags);
+		$tags = addslashes($tags);
+		return trim($tags);  
+	}
+}
 
 tags($_REQUEST);
 tags($_POST);
@@ -108,7 +110,7 @@ function PlusCaptcha_register_form() {
   //var_export($_POST);
   // See if the user has posted us some information
   // If they did, this hidden field will be set to 'Y'
-  if ((isset($_POST[$hidden_field_name])) && ($_POST[$hidden_field_name] == 'Y')) {
+  if ((tags(isset($_POST[$hidden_field_name]))) && (tags($_POST[$hidden_field_name]) == 'Y')) {
     $result = json_decode(submit_register_form($_POST), true);
     if ($result['error']) {
       if (!empty($result['html'])) {
@@ -116,7 +118,7 @@ function PlusCaptcha_register_form() {
       }
     } else {
       update_option('uuid_key_speci_to_generate_captchas', $result['app_id']);
-	  update_option('PlusCaptcha_feedback_quemejoraria', $_POST["PlusCaptcha_feedback_quemejoraria"]);
+	  update_option('PlusCaptcha_feedback_quemejoraria', tags($_POST["PlusCaptcha_feedback_quemejoraria"]));
       //update_option('PlusCaptcha_key', $result['key']);
       //update_option('PlusCaptcha_secret', $result['secret']);
 
@@ -136,8 +138,8 @@ function PlusCaptcha_register_form() {
 	$form_html = "NONE";
   }
   // Fill Register Form fields
-  $website = json_encode(empty($_POST['website']) ? "http://{$_SERVER['SERVER_NAME']}/" : $_POST['website']);
-  $email = json_encode($_POST['email']);
+  $website = json_encode(tags(empty($_POST['website'])) ? "http://{".tags($_SERVER['SERVER_NAME'])."}/" : tags($_POST['website']));
+  $email = json_encode(tags($_POST['email']));
   
   //jQuery('<div><input type="text" class="field" name="dynamic[]" value="' + i + '" /></div>').fadeIn('slow').appendTo('.inputs');
   $form_html .= "<script type=\"text/javascript\" language=\"javascript\">\n";
@@ -148,20 +150,20 @@ function PlusCaptcha_register_form() {
   $form_html .= "    jQuery('input[name=website]').val($website);\n";
   $form_html .= "    jQuery('input[name=email]').val($email);\n";
 
-  if (isset($_POST['language'])) {
-    $language = (int) $_POST['language'];
+  if (tags(isset($_POST['language']))) {
+    $language = (int) tags($_POST['language']);
     $form_html .= "    jQuery('select[name=language]').val($language);\n";
   }
-  if (isset($_POST['category'])) {
-    $category = (int) $_POST['category'];
+  if (tags(isset($_POST['category']))) {
+    $category = (int) tags($_POST['category']);
     $form_html .= "    jQuery('select[name=category]').val($category);\n";
   }
-  if (isset($_POST['site_category'])) {
-    $site_category = (int) $_POST['site_category'];
+  if (tags(isset($_POST['site_category']))) {
+    $site_category = (int) tags($_POST['site_category']);
     $form_html .= "    jQuery('select[name=site_category]').val($site_category);\n";
   }
-  if (isset($_POST['gender'])) {
-    $gender = (int) $_POST['gender'];
+  if (tags(isset($_POST['gender']))) {
+    $gender = (int) tags($_POST['gender']);
     $form_html .= "    jQuery('select[name=gender]').val($gender);\n";
   }
   $form_html .= "</script>\n";
@@ -209,12 +211,12 @@ function sweetcatpcha_main_settings($ignore_post = false) {
 
   // See if the user has posted us some information
   // If they did, this hidden field will be set to 'Y'
-  if ((!$ignore_post) && (isset($_POST[$hidden_field_name])) && ($_POST[$hidden_field_name] == 'Y')) {
+  if ((!$ignore_post) && (tags(isset($_POST[$hidden_field_name]))) && (tags($_POST[$hidden_field_name]) == 'Y')) {
     $rs = TRUE;
 
     // Read their posted value
     foreach ($PlusCaptcha_options as $opt_name => $v) {
-      $opt_val = isset($_POST[$opt_name]) ? $_POST[$opt_name] : null;
+      $opt_val = tags(isset($_POST[$opt_name])) ? tags($_POST[$opt_name]) : null;
 
       // Save the posted value in the database
       update_option($opt_name, $opt_val);
@@ -286,10 +288,10 @@ function plscptf_settings_save() {
   $userslogin = $wpdb->get_col("SELECT user_login FROM  $wpdb->users ", 0);
   $plscptf_options_submit = array();
   // Save data for settings page
-  $plscptf_options_submit['plscptf_user_email'] = $_REQUEST['plscptf_user_email'];
-  $plscptf_options_submit['plscptf_custom_email'] = $_REQUEST['plscptf_custom_email'];
-  $plscptf_options_submit['plscptf_select_email'] = $_REQUEST['plscptf_select_email'];
-  $plscptf_options_submit['plscptf_additions_options'] = isset($_REQUEST['plscptf_additions_options']) ? $_REQUEST['plscptf_additions_options'] : 0;
+  $plscptf_options_submit['plscptf_user_email'] = tags($_REQUEST['plscptf_user_email']);
+  $plscptf_options_submit['plscptf_custom_email'] = tags($_REQUEST['plscptf_custom_email']);
+  $plscptf_options_submit['plscptf_select_email'] = tags($_REQUEST['plscptf_select_email']);
+  $plscptf_options_submit['plscptf_additions_options'] = tags(isset($_REQUEST['plscptf_additions_options'])) ? tags($_REQUEST['plscptf_additions_options']) : 0;
   if ($plscptf_options_submit['plscptf_additions_options'] == 0) {
     $plscptf_options_submit['plscptf_send_copy'] = 0;
     $plscptf_options_submit['plscptf_from_field'] = get_bloginfo('name');
@@ -308,16 +310,16 @@ function plscptf_settings_save() {
     $plscptf_options_submit['plscptf_thank_text'] = __("Thank you for contacting us.", 'PlusCaptcha');
     $plscptf_options_submit['plscptf_redirect_url'] = '';
   } else {
-    $plscptf_options_submit['plscptf_send_copy'] = isset($_REQUEST['plscptf_send_copy']) ? $_REQUEST['plscptf_send_copy'] : 0;
-    $plscptf_options_submit['plscptf_mail_method'] = $_REQUEST['plscptf_mail_method'];
-    $plscptf_options_submit['plscptf_from_field'] = $_REQUEST['plscptf_from_field'];
-    $plscptf_options_submit['plscptf_display_add_info'] = isset($_REQUEST['plscptf_display_add_info']) ? 1 : 0;
-    $plscptf_options_submit['plscptf_change_label'] = isset($_REQUEST['plscptf_change_label']) ? 1 : 0;
+    $plscptf_options_submit['plscptf_send_copy'] = tags(isset($_REQUEST['plscptf_send_copy'])) ? tags($_REQUEST['plscptf_send_copy']) : 0;
+    $plscptf_options_submit['plscptf_mail_method'] = tags($_REQUEST['plscptf_mail_method']);
+    $plscptf_options_submit['plscptf_from_field'] = tags($_REQUEST['plscptf_from_field']);
+    $plscptf_options_submit['plscptf_display_add_info'] = tags(isset($_REQUEST['plscptf_display_add_info'])) ? 1 : 0;
+    $plscptf_options_submit['plscptf_change_label'] = tags(isset($_REQUEST['plscptf_change_label'])) ? 1 : 0;
     if ($plscptf_options_submit['plscptf_display_add_info'] == 1) {
-      $plscptf_options_submit['plscptf_display_sent_from'] = isset($_REQUEST['plscptf_display_sent_from']) ? 1 : 0;
-      $plscptf_options_submit['plscptf_display_date_time'] = isset($_REQUEST['plscptf_display_date_time']) ? 1 : 0;
-      $plscptf_options_submit['plscptf_display_coming_from'] = isset($_REQUEST['plscptf_display_coming_from']) ? 1 : 0;
-      $plscptf_options_submit['plscptf_display_user_agent'] = isset($_REQUEST['plscptf_display_user_agent']) ? 1 : 0;
+      $plscptf_options_submit['plscptf_display_sent_from'] = tags(isset($_REQUEST['plscptf_display_sent_from'])) ? 1 : 0;
+      $plscptf_options_submit['plscptf_display_date_time'] = tags(isset($_REQUEST['plscptf_display_date_time'])) ? 1 : 0;
+      $plscptf_options_submit['plscptf_display_coming_from'] = tags(isset($_REQUEST['plscptf_display_coming_from'])) ? 1 : 0;
+      $plscptf_options_submit['plscptf_display_user_agent'] = tags(isset($_REQUEST['plscptf_display_user_agent'])) ? 1 : 0;
     } else {
       $plscptf_options_submit['plscptf_display_sent_from'] = 1;
       $plscptf_options_submit['plscptf_display_date_time'] = 1;
@@ -325,19 +327,19 @@ function plscptf_settings_save() {
       $plscptf_options_submit['plscptf_display_user_agent'] = 1;
     }
     if ($plscptf_options_submit['plscptf_change_label'] == 1) {
-      $plscptf_options_submit['plscptf_name_label'] = isset($_REQUEST['plscptf_name_label']) ? $_REQUEST['plscptf_name_label'] : $plscptf_options_submit['plscptf_name_label'];
-      $plscptf_options_submit['plscptf_email_label'] = isset($_REQUEST['plscptf_email_label']) ? $_REQUEST['plscptf_email_label'] : $plscptf_options_submit['plscptf_email_label'];
-      $plscptf_options_submit['plscptf_subject_label'] = isset($_REQUEST['plscptf_subject_label']) ? $_REQUEST['plscptf_subject_label'] : $plscptf_options_submit['plscptf_subject_label'];
-      $plscptf_options_submit['plscptf_message_label'] = isset($_REQUEST['plscptf_message_label']) ? $_REQUEST['plscptf_message_label'] : $plscptf_options_submit['plscptf_message_label'];
+      $plscptf_options_submit['plscptf_name_label'] = tags(isset($_REQUEST['plscptf_name_label'])) ? tags($_REQUEST['plscptf_name_label']) : $plscptf_options_submit['plscptf_name_label'];
+      $plscptf_options_submit['plscptf_email_label'] = tags(isset($_REQUEST['plscptf_email_label'])) ? tags($_REQUEST['plscptf_email_label']) : $plscptf_options_submit['plscptf_email_label'];
+      $plscptf_options_submit['plscptf_subject_label'] = tags(isset($_REQUEST['plscptf_subject_label'])) ? tags($_REQUEST['plscptf_subject_label']) : $plscptf_options_submit['plscptf_subject_label'];
+      $plscptf_options_submit['plscptf_message_label'] = tags(isset($_REQUEST['plscptf_message_label'])) ? tags($_REQUEST['plscptf_message_label']) : $plscptf_options_submit['plscptf_message_label'];
     } else {
       $plscptf_options_submit['plscptf_name_label'] = __("Name:", 'PlusCaptcha');
       $plscptf_options_submit['plscptf_email_label'] = __("E-Mail Address:", 'PlusCaptcha');
       $plscptf_options_submit['plscptf_subject_label'] = __("Subject:", 'PlusCaptcha');
       $plscptf_options_submit['plscptf_message_label'] = __("Message:", 'PlusCaptcha');
     }
-    $plscptf_options_submit['plscptf_action_after_send'] = $_REQUEST['plscptf_action_after_send'];
-    $plscptf_options_submit['plscptf_thank_text'] = $_REQUEST['plscptf_thank_text'];
-    $plscptf_options_submit['plscptf_redirect_url'] = $_REQUEST['plscptf_redirect_url'];
+    $plscptf_options_submit['plscptf_action_after_send'] = tags($_REQUEST['plscptf_action_after_send']);
+    $plscptf_options_submit['plscptf_thank_text'] = tags($_REQUEST['plscptf_thank_text']);
+    $plscptf_options_submit['plscptf_redirect_url'] = tags($_REQUEST['plscptf_redirect_url']);
   }
   $plscptf_options = array_merge($plscptf_options, $plscptf_options_submit);
   if ($plscptf_options_submit['plscptf_action_after_send'] == 0
@@ -357,7 +359,7 @@ function plscptf_settings_save() {
       $error .=__("Such user does not exist. Settings not saved.", 'PlusCaptcha');
     }
   } else {
-    if ( isset($_REQUEST['PlusCaptcha_form_contact']) ) {
+    if ( tags(isset($_REQUEST['PlusCaptcha_form_contact'])) ) {
       if ($plscptf_options_submit['plscptf_custom_email'] != "" && preg_match("/^((?:[a-z0-9]+(?:[a-z0-9\-_\.]+)?@[a-z0-9]+(?:[a-z0-9\-\.]+)?\.[a-z]{2,5})[, ]*)+$/i", trim($plscptf_options_submit['plscptf_custom_email']))) {
         update_option('PlusCaptcha_form_contact_options', $plscptf_options, '', 'yes');
       $message = __("Options saved.", 'PlusCaptcha');

programming_language: PHP
filename: public.php
change_type: ModificationType.MODIFY
diff: @@ -1,13 +1,25 @@
 <?php
 
+if (!function_exists('tags')) {
+	# Clean
+	# Limpiar data
+	function tags($tags){  
+		$tags = strip_tags($tags);  
+		$tags = stripslashes($tags);  
+		$tags = htmlentities($tags);
+		$tags = addslashes($tags);
+		return trim($tags);  
+	}
+}
+
 /**
  * Get PlusCaptcha values from POST data
  * @return array
  */
 function PlusCaptcha_get_values() {
 	return array(
-		'sckey'		=> ( isset( $_POST[ 'sckey' ] ) ? $_POST[ 'sckey' ] : '' ),
-		'scvalue'	=> ( isset( $_POST[ 'scvalue' ] ) ? $_POST[ 'scvalue' ] : '' )
+		'sckey'		=> ( tags( isset( $_POST[ 'sckey' ]) ) ? tags($_POST[ 'sckey' ]) : '' ),
+		'scvalue'	=> ( tags( isset( $_POST[ 'scvalue' ]) ) ? tags($_POST[ 'scvalue' ]) : '' )
 	);
 }
 
@@ -260,7 +272,7 @@ function PlusCaptcha_registration_form() {
 function PlusCaptcha_authenticate($user) {
 	global $PlusCaptcha_instance;
 	//$scValues = PlusCaptcha_get_values();
-	if ( !empty( $_POST ) && get_result(simpleSessionGet("contacto", "")) == false ) {
+	if (  tags( !empty( $_POST ) ) && get_result(simpleSessionGet("contacto", "")) == false ) {
 		$user = new WP_Error( 'captcha_wrong', '<strong>' . __( 'ERROR', 'PlusCaptcha' ) . '</strong>: ' . __( PlusCaptcha_ERROR_MESSAGE, 'PlusCaptcha' ) );
 	}else{
 		//$_SESSION["passport"] = false;
@@ -353,7 +365,7 @@ function PlusCaptcha_signup_extra_fields($errors) {
  */
 function PlusCaptcha_wpmu_validate_user_signup($errors) {
 	global $PlusCaptcha_instance;
-	if ( $_POST['stage'] == 'validate-user-signup' ) {
+	if ( tags($_POST['stage']) == 'validate-user-signup' ) {
 		//$scValues = PlusCaptcha_get_values();
 		if ( get_result(simpleSessionGet("contacto", "")) == false ) {
 			$errors['errors']->add( 'captcha_wrong', '<strong>' . __( 'ERROR', 'PlusCaptcha' ) . '</strong>: ' . __(PlusCaptcha_ERROR_MESSAGE, 'PlusCaptcha' ) );

programming_language: PHP
filename: shortcode-and-others.php
change_type: ModificationType.MODIFY
diff: @@ -1,14 +1,16 @@
 <?php
 
-# Clean
-# Limpiar data
-function tags($tags){  
-	$tags = strip_tags($tags);  
-	$tags = stripslashes($tags);  
-	$tags = htmlentities($tags);
-	$tags = addslashes($tags);
-	return trim($tags);  
-} 
+if (!function_exists('tags')) {
+	# Clean
+	# Limpiar data
+	function tags($tags){  
+		$tags = strip_tags($tags);  
+		$tags = stripslashes($tags);  
+		$tags = htmlentities($tags);
+		$tags = addslashes($tags);
+		return trim($tags);  
+	}
+}
 
 tags($_REQUEST);
 tags($_POST);
@@ -22,13 +24,13 @@ if (!function_exists('plscptf_display_form')) {
     $plscptf_options = get_option('PlusCaptcha_form_contact_options');
     $content = "";
 
-    $page_url = ( isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" ? "https://" : "http://" ) . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
+    $page_url = ( tags(isset($_SERVER["HTTPS"])) && tags($_SERVER["HTTPS"]) == "on" ? "https://" : "http://" ) . tags($_SERVER["SERVER_NAME"]) . tags($_SERVER["REQUEST_URI"]);
     // If contact form submited
-    $name = isset($_REQUEST['plscptf_contact_name']) ? $_REQUEST['plscptf_contact_name'] : "";
-    $email = isset($_REQUEST['plscptf_contact_email']) ? $_REQUEST['plscptf_contact_email'] : "";
-    $subject = isset($_REQUEST['plscptf_contact_subject']) ? $_REQUEST['plscptf_contact_subject'] : "";
-    $message = isset($_REQUEST['plscptf_contact_message']) ? $_REQUEST['plscptf_contact_message'] : "";
-    $send_copy = isset($_REQUEST['plscptf_contact_send_copy']) ? $_REQUEST['plscptf_contact_send_copy'] : "";
+    $name = tags(isset($_REQUEST['plscptf_contact_name'])) ? tags($_REQUEST['plscptf_contact_name']) : "";
+    $email = tags(isset($_REQUEST['plscptf_contact_email'])) ? tags($_REQUEST['plscptf_contact_email']) : "";
+    $subject = tags(isset($_REQUEST['plscptf_contact_subject'])) ? tags($_REQUEST['plscptf_contact_subject']) : "";
+    $message = tags(isset($_REQUEST['plscptf_contact_message'])) ? tags($_REQUEST['plscptf_contact_message']) : "";
+    $send_copy = tags(isset($_REQUEST['plscptf_contact_send_copy'])) ? tags($_REQUEST['plscptf_contact_send_copy']) : "";
     // If it is good
     if (true === $result) {
       $_SESSION['plscptf_send_mail'] = true;
@@ -116,7 +118,7 @@ if (!function_exists('plscptf_check_and_send')) {
     //die ('plscptf_check_and_send'); 
     global $result;
     $plscptf_options = get_option('PlusCaptcha_form_contact_options');
-    if (isset($_REQUEST['plscptf_contact_action'])) {
+    if (tags(isset($_REQUEST['plscptf_contact_action']))) {
       // Check all input data
       $result = plscptf_check_form();
     }
@@ -147,13 +149,13 @@ if (!function_exists('plscptf_check_form')) {
     $error_message['error_message'] = __("Message text required.", 'PlusCaptcha');
     $error_message['error_form'] = __("Please correct your input data below and try again.", 'PlusCaptcha');
     // Check information
-    if ("" != $_REQUEST['plscptf_contact_name'])
+    if ("" != tags($_REQUEST['plscptf_contact_name']))
       unset($error_message['error_name']);
-    if ("" != $_REQUEST['plscptf_contact_email'] && preg_match("/^(?:[a-z0-9]+(?:[a-z0-9\-_\.]+)?@[a-z0-9]+(?:[a-z0-9\-\.]+)?\.[a-z]{2,5})$/i", trim($_REQUEST['plscptf_contact_email'])))
+    if ("" != tags($_REQUEST['plscptf_contact_email']) && preg_match("/^(?:[a-z0-9]+(?:[a-z0-9\-_\.]+)?@[a-z0-9]+(?:[a-z0-9\-\.]+)?\.[a-z]{2,5})$/i", tags(trim($_REQUEST['plscptf_contact_email']))))
       unset($error_message['error_email']);
-    if ("" != $_REQUEST['plscptf_contact_subject'])
+    if ("" != tags($_REQUEST['plscptf_contact_subject']))
       unset($error_message['error_subject']);
-    if ("" != $_REQUEST['plscptf_contact_message'])
+    if ("" != tags($_REQUEST['plscptf_contact_message']))
       unset($error_message['error_message']);
     
     PlusCaptcha_validate_contact_form($error_message);
@@ -191,7 +193,7 @@ if (!function_exists('plscptf_send_mail')) {
     }
     if ("" != $to) {
       // subject
-      $subject = $_REQUEST['plscptf_contact_subject'];
+      $subject = tags($_REQUEST['plscptf_contact_subject']);
       $user_info_string = '';
       $userdomain = '';
       $form_action_url = '';
@@ -199,13 +201,13 @@ if (!function_exists('plscptf_send_mail')) {
       $headers = "";
 
       if (getenv('HTTPS') == 'on') {
-        $form_action_url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+        $form_action_url = 'https://' . tags($_SERVER['HTTP_HOST']) . tags($_SERVER['REQUEST_URI']);
       } else {
-        $form_action_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+        $form_action_url = 'http://' . tags($_SERVER['HTTP_HOST']) . tags($_SERVER['REQUEST_URI']);
       }
 
       if ($plscptf_options['plscptf_display_add_info'] == 1) {
-        $userdomain = gethostbyaddr($_SERVER['REMOTE_ADDR']);
+        $userdomain = gethostbyaddr(tags($_SERVER['REMOTE_ADDR']));
         if ($plscptf_options['plscptf_display_add_info'] == 1 ||
                 $plscptf_options['plscptf_display_sent_from'] == 1 ||
                 $plscptf_options['plscptf_display_coming_from'] == 1 ||
@@ -216,7 +218,7 @@ if (!function_exists('plscptf_send_mail')) {
         }
         if ($plscptf_options['plscptf_display_sent_from'] == 1) {
           $user_info_string .= '<tr>
-							<td>' . __('Sent from (ip address)', 'PlusCaptcha') . ':</td><td>' . $_SERVER['REMOTE_ADDR'] . " ( " . $userdomain . " )" . '</td>
+							<td>' . __('Sent from (ip address)', 'PlusCaptcha') . ':</td><td>' . tags($_SERVER['REMOTE_ADDR']) . " ( " . $userdomain . " )" . '</td>
 						</tr>';
         }
         if ($plscptf_options['plscptf_display_date_time'] == 1) {
@@ -231,7 +233,7 @@ if (!function_exists('plscptf_send_mail')) {
         }
         if ($plscptf_options['plscptf_display_user_agent'] == 1) {
           $user_info_string .= '<tr>
-							<td>' . __('Using (user agent)', 'PlusCaptcha') . ':</td><td>' . plscptf_clean_input($_SERVER['HTTP_USER_AGENT']) . '</td>
+							<td>' . __('Using (user agent)', 'PlusCaptcha') . ':</td><td>' . plscptf_clean_input(tags($_SERVER['HTTP_USER_AGENT'])) . '</td>
 						</tr>';
         }
       }
@@ -244,16 +246,16 @@ if (!function_exists('plscptf_send_mail')) {
 			<body>
 				<table>
 					<tr>
-						<td width="160">' . __("Name", 'PlusCaptcha') . '</td><td>' . $_REQUEST['plscptf_contact_name'] . '</td>
+						<td width="160">' . __("Name", 'PlusCaptcha') . '</td><td>' . tags($_REQUEST['plscptf_contact_name']) . '</td>
 					</tr>
 					<tr>
-						<td>' . __("Email", 'PlusCaptcha') . '</td><td>' . $_REQUEST['plscptf_contact_email'] . '</td>
+						<td>' . __("Email", 'PlusCaptcha') . '</td><td>' . tags($_REQUEST['plscptf_contact_email']) . '</td>
 					</tr>
 					<tr>
-						<td>' . __("Subject", 'PlusCaptcha') . '</td><td>' . $_REQUEST['plscptf_contact_subject'] . '</td>
+						<td>' . __("Subject", 'PlusCaptcha') . '</td><td>' . tags($_REQUEST['plscptf_contact_subject']) . '</td>
 					</tr>
 					<tr>
-						<td>' . __("Message", 'PlusCaptcha') . '</td><td>' . $_REQUEST['plscptf_contact_message'] . '</td>
+						<td>' . __("Message", 'PlusCaptcha') . '</td><td>' . tags($_REQUEST['plscptf_contact_message']) . '</td>
 					</tr>
 					<tr>
 						<td>' . __("Site", 'PlusCaptcha') . '</td><td>' . get_bloginfo("url") . '</td>
@@ -272,9 +274,9 @@ if (!function_exists('plscptf_send_mail')) {
         $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
 
         // Additional headers
-        $headers .= 'From: ' . $_REQUEST['plscptf_contact_email'] . "\r\n";
-        if (isset($_REQUEST['plscptf_contact_send_copy']) && $_REQUEST['plscptf_contact_send_copy'] == 1)
-          wp_mail($_REQUEST['plscptf_contact_email'], stripslashes($subject), stripslashes($message), $headers, $attachments);
+        $headers .= 'From: ' . tags($_REQUEST['plscptf_contact_email']) . "\r\n";
+        if (tags(isset($_REQUEST['plscptf_contact_send_copy'])) && tags($_REQUEST['plscptf_contact_send_copy']) == 1)
+          wp_mail(tags($_REQUEST['plscptf_contact_email']), stripslashes($subject), stripslashes($message), $headers, $attachments);
 
         // Mail it
         return wp_mail($to, stripslashes($subject), stripslashes($message), $headers, $attachments);
@@ -285,9 +287,9 @@ if (!function_exists('plscptf_send_mail')) {
         $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
 
         // Additional headers
-        $headers .= 'From: ' . $_REQUEST['plscptf_contact_email'] . "\r\n";
-        if (isset($_REQUEST['plscptf_contact_send_copy']) && $_REQUEST['plscptf_contact_send_copy'] == 1)
-          @mail($_REQUEST['plscptf_contact_email'], stripslashes($subject), stripslashes($message), $headers);
+        $headers .= 'From: ' . tags($_REQUEST['plscptf_contact_email']) . "\r\n";
+        if (tags(isset($_REQUEST['plscptf_contact_send_copy'])) && tags($_REQUEST['plscptf_contact_send_copy']) == 1)
+          @mail(tags($_REQUEST['plscptf_contact_email']), stripslashes($subject), stripslashes($message), $headers);
 
         return @mail($to, stripslashes($subject), stripslashes($message), $headers);
       }

programming_language: PHP
filename: readme.txt
change_type: ModificationType.MODIFY
diff: @@ -1,6 +1,6 @@
 === PlusCaptcha ===
 Contributors: PlusCaptcha
-Version: 2.0.6
+Version: 2.0.14
 Tags: pluscaptcha, captcha, antispam, comment, catcha, registration, match captcha, lost password, login, spam, images captcha, capcha, captha, ecology, ecoplus, plus, buddypress, contact form 7, sweetcaptcha, text captcha, multilingual, register, admin, ajax, image, images, keycaptcha, plugin, post, akismet, wpmu, re captcha, recaptcha, wordpress captcha, picture captcha
 Requires at least: 3.0.0
 Tested up to: 4.0.0
@@ -133,6 +133,9 @@ At this point, **your account was created automatically (NEW FEATURE!) and you d
 
 == Changelog ==
 
+= 2.0.10 =
+* Cross-site scripting (XSS) loged user side fixed. Thanks to Carlo Pelliccioni @ Hacktive Security
+
 = 2.0.6 =
 * Fixed security things reported by security.szurek.pl, Thanks!
 
@@ -184,6 +187,9 @@ Credits: Mistakes reported to emergency@pluscaptcha.com (Thank to Claude @ Norwo
 
 == Upgrade Notice ==
 
+= 2.0.10 =
+* Cross-site scripting (XSS) loged user side fixed. Thanks to Carlo Pelliccioni @ Hacktive Security
+
 = 2.0.6 =
 * Fixed security things reported by security.szurek.pl, Thanks!
 

programming_language: Markdown
filename: admin-options-contactform.php
change_type: ModificationType.MODIFY
diff: @@ -1,5 +1,5 @@
 <!-- Additional options in admin PlusCaptcha Settings -->
-<?php 
+<?php
 global $error, $wpdb; 
 $userslogin = $wpdb->get_col("SELECT user_login FROM  $wpdb->users ", 0);
 ?>

programming_language: PHP
filename: admin-options.php
change_type: ModificationType.MODIFY
diff: @@ -1,5 +1,17 @@
 <?php
 
+if (!function_exists('tags')) {
+	# Clean
+	# Limpiar data
+	function tags($tags){  
+		$tags = strip_tags($tags);  
+		$tags = stripslashes($tags);  
+		$tags = htmlentities($tags);
+		$tags = addslashes($tags);
+		return trim($tags);  
+	}
+}
+
 $status = @fgets(@fopen("http://www.pluscaptcha.com/status/", 'r'), 4096);
 
 /**
@@ -10,7 +22,7 @@ if( get_option('PlusCaptcha_feedback_quemejoraria', '') != get_option('actual_Pl
 {
 	// Enviar feedback
 	$url = 'http://www.pluscaptcha.com/api/wp_log/feedback?'
-		.'quemejorar='.substr(str_replace(".","[dot]",urlencode($_POST["PlusCaptcha_feedback_quemejoraria"])),0,299).
+		.'quemejorar='.substr(str_replace(".","[dot]",urlencode(tags($_POST["PlusCaptcha_feedback_quemejoraria"]))),0,299).
 		'&uuid='.get_option( 'uuid_api_wp_feedback' ).'';
 		@fgets(@fopen($url, 'r'), 4096);
 	// Guardar Feedback en forma local

programming_language: PHP
filename: admin-register.php
change_type: ModificationType.MODIFY
diff: @@ -1,3 +1,18 @@
+<?php
+
+if (!function_exists('tags')) {
+	# Clean
+	# Limpiar data
+	function tags($tags){  
+		$tags = strip_tags($tags);  
+		$tags = stripslashes($tags);  
+		$tags = htmlentities($tags);
+		$tags = addslashes($tags);
+		return trim($tags);  
+	}
+}
+
+?>
 <style type="text/css">
 #register_message {
 	margin-bottom: 10px;

programming_language: PHP