CVE-2014-125103 (PHP, published 2023-05-31T03:15Z)
Description: value: A vulnerability was found in BestWebSoft Twitter Plugin up to 1.3.2 on WordPress. It has been declared as problematic. Affected by this vulnerability is the function twttr_settings_page of the file twitter.php. The manipulation of the argument twttr_url_twitter/bws_license_key/bws_license_plugin leads to cross site scripting. The attack can be launched remotely. Upgrading to version 1.3.7 is able to address this issue. The patch is named e04d59ab578316ffeb204cf32dc71c0d0e1ff77c. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-230155.
Severity: nan (CVSS v3 base score: 6.1)
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
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.
Repository: https://github.com/wp-plugins/twitter-plugin
Files changed:
bws_menu/bws_menu.php
bws_menu/css/style.css
readme.txt
twitter.php
Commit message: V2.37 - Security Exploit was fixed.

git-svn-id: https://plugins.svn.wordpress.org/twitter-plugin/trunk@961807 b8457f37-d9ea-0310-8a92-e5e31aec5664


Vulnerable code:
* Version: 1.3.2
				'description'	=> 'Allows you to celebrate liked the article.',
				'wp_install'	=> 'http://bestwebsoft.com/plugin/user-role/?k=dfe2244835c6fbf601523964b3f34ccc&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
				'description'	=> 'Allows you to celebrate liked the article.',
				$bwsmn_form_email = trim( $_REQUEST['bwsmn_form_email'] );
				if ( $bwsmn_form_email == "" || !preg_match( "/^((?:[a-z0-9']+(?:[a-z0-9\-_\.']+)?@[a-z0-9]+(?:[a-z0-9\-\.]+)?\.[a-z]{2,5})[, ]*)+$/i", $bwsmn_form_email ) ) {
				$message_text .= '</table>
				<h4>Active Plugins</h4>
				<table>';
				foreach ( $system_info['active_plugins'] as $key => $value ) {	
					$message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>';	
				$message_text .= '</table>
				<h4>Inactive Plugins</h4>
				<table>';
				foreach ( $system_info['inactive_plugins'] as $key => $value ) {
					$message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>';
				$message_text .= '</table></body></html>';
										<span> | </span>
										<a href="<?php echo $bws_plugins_pro[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a>
										<span> | </span>
										<a href="<?php echo $bws_plugins[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a>
						<?php foreach ( $system_info['active_plugins'] as $key => $value ) { ?>	
							<tr>
								<td scope="row"><?php echo $key; ?></td>
								<td scope="row"><?php echo $value; ?></td>
							</tr>	
						<?php } ?>
Tested up to: 3.9.1
Stable tag: 2.36
Twitter plugin allows you to add the Follow and the Like buttons the easiest way.
Version: 2.36
			$twttr_options['url_twitter']		=	$_REQUEST['twttr_url_twitter'];
			$bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? trim( $_POST['bws_license_key'] ) : "";
						$bws_license_plugin = trim( $_POST['bws_license_plugin'] );	
		$upload_dir = wp_upload_dir();
		$twttr_cstm_mg_folder = $upload_dir['basedir'] . '/twitter-logo/';
		if ( is_dir( $twttr_cstm_mg_folder ) ) {
			$twttr_cstm_mg_files = scandir( $twttr_cstm_mg_folder );
			foreach ( $twttr_cstm_mg_files as $value ) {
				@unlink ( $twttr_cstm_mg_folder . $value );
			@rmdir( $twttr_cstm_mg_folder );
		}

Fixed code:
* Version: 1.3.7
				'description'	=> 'Allows you to see how many times your page has been liked on Google Search Engine as well as who has liked the article.',
				'wp_install'	=> '/wp-admin/plugin-install.php?tab=search&s=User+Role+BestWebSoft&plugin-search-input=Search+Plugins',
			),
			'email-queue/email-queue.php' => array(
				'name'			=> 'Email Queue',
				'description'	=> 'Allows to manage email massages sent by BestWebSoft plugins.',
				'link'			=> 'http://bestwebsoft.com/plugin/email-queue/?k=e345e1b6623f0dca119bc2d9433b130b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
				'download'		=> 'http://bestwebsoft.com/plugin/email-queue/?k=e345e1b6623f0dca119bc2d9433b130b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
				'wp_install'	=> '/wp-admin/plugin-install.php?tab=search&s=Email+Queue+BestWebSoft&plugin-search-input=Search+Plugins',
				'settings'		=> 'admin.php?page=mlq_settings'
			),
			'limit-attempts/limit-attempts.php' => array(
				'name'			=> 'Limit Attempts',
				'description'	=> 'Allows you to limit rate of login attempts by the ip, and create whitelist and blacklist.',
				'link'			=> 'http://bestwebsoft.com/plugin/limit-attempts/?k=b14e1697ee4d008abcd4bd34d492573a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
				'download'		=> 'http://bestwebsoft.com/plugin/limit-attempts/?k=b14e1697ee4d008abcd4bd34d492573a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
				'wp_install'	=> '/wp-admin/plugin-install.php?tab=search&s=Limit+Attempts+BestWebSoft&plugin-search-input=Search+Plugins',
				'settings'		=> 'admin.php?page=limit-attempts.php',
				'pro_version'	=> 'limit-attempts-pro/limit-attempts-pro.php'
			),
			'job-board/job-board.php' => array(
				'name'			=> 'Job board',
				'description'	=> 'Allows to create a job-board page on your site.',
				'link'			=> 'http://bestwebsoft.com/plugin/job-board/?k=b0c504c9ce6edd6692e04222af3fed6f&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
				'download'		=> 'http://bestwebsoft.com/plugin/job-board/?k=b0c504c9ce6edd6692e04222af3fed6f&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
				'wp_install'	=> '/wp-admin/plugin-install.php?tab=search&type=term&s=Job+board+BestWebSoft&plugin-search-input=Search+Plugins',
				'settings'		=> 'admin.php?page=job-board.php'
				'description'	=> 'Allows you to see how many times your page has been liked on Google Search Engine as well as who has liked the article.',
			),
			'limit-attempts-pro/limit-attempts-pro.php' => array(
				'name'			=> 'Limit Attempts Pro',
				'description'	=> 'Allows you to limit rate of login attempts by the ip, and create whitelist and blacklist.',
				'link'			=> 'http://bestwebsoft.com/plugin/limit-attempts-pro/?k=9d42cdf22c7fce2c4b6b447e6a2856e0&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
				'purchase' 		=> 'http://bestwebsoft.com/plugin/limit-attempts-pro/?k=9d42cdf22c7fce2c4b6b447e6a2856e0&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#purchase',
				'settings'		=> 'admin.php?page=limit-attempts-pro.php',
				$bwsmn_form_email = esc_html( trim( $_REQUEST['bwsmn_form_email'] ) );
				if ( $bwsmn_form_email == "" || ! is_email( $bwsmn_form_email ) ) {
				$message_text .= '</table>';
				if ( ! empty( $system_info['active_plugins'] ) ) {
					$message_text .= '<h4>Active Plugins</h4>
					<table>';
					foreach ( $system_info['active_plugins'] as $key => $value ) {	
						$message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>';	
					}
					$message_text .= '</table>';
				if ( ! empty( $system_info['inactive_plugins'] ) ) {
					$message_text .= '<h4>Inactive Plugins</h4>
					<table>';
					foreach ( $system_info['inactive_plugins'] as $key => $value ) {
						$message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>';
					}
					$message_text .= '</table>';
				$message_text .= '</body></html>';
										<?php if ( '' != $bws_plugins_pro[ $key_plugin ]["settings"] ) { ?>
											<span> | </span>
											<a href="<?php echo $bws_plugins_pro[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a>
										<?php } ?>
										<?php if ( '' != $bws_plugins[ $key_plugin ]["settings"] ) { ?>
											<span> | </span>
											<a href="<?php echo $bws_plugins[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a>
										<?php } ?>
						<?php if ( ! empty( $system_info['active_plugins'] ) ) {
							foreach ( $system_info['active_plugins'] as $key => $value ) { ?>	
								<tr>
									<td scope="row"><?php echo $key; ?></td>
									<td scope="row"><?php echo $value; ?></td>
								</tr>	
							<?php }
						} ?>
    line-height: 19px;
Tested up to: 4.0-beta3
Stable tag: 2.37
Twitter plugin allows you to add the Follow and the Like buttons the easiest way. Want to be always in touch with your friends and readers? Cannot imagine your life without Twitter? It is all in several clicks!
= V2.37 - 07.08.2014 =
* Budfix : Security Exploit was fixed.

= V2.37 =
Security Exploit was fixed.

Version: 2.37
			$twttr_options['url_twitter']		=	stripslashes( esc_html( $_REQUEST['twttr_url_twitter'] ) );
			$bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? trim( esc_html( $_POST['bws_license_key'] ) ) : "";
						$bws_license_plugin = stripslashes( esc_html( $_POST['bws_license_plugin'] ) );	
				array( 'lmtttmpts_hide_banner_on_plugin_page', 'limit-attempts/limit-attempts.php', '1.0.2' ),
		if ( ! function_exists( 'get_plugins' ) )
			require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
		$all_plugins = get_plugins();
		if ( ! array_key_exists( 'twitter-pro/twitter-pro.php', $all_plugins ) ) {
			/* delete custom images if no PRO version */
			$upload_dir = wp_upload_dir();
			$twttr_cstm_mg_folder = $upload_dir['basedir'] . '/twitter-logo/';
			if ( is_dir( $twttr_cstm_mg_folder ) ) {
				$twttr_cstm_mg_files = scandir( $twttr_cstm_mg_folder );
				foreach ( $twttr_cstm_mg_files as $value ) {
					@unlink ( $twttr_cstm_mg_folder . $value );
				}
				@rmdir( $twttr_cstm_mg_folder );
		}