CVE-2014-125097 (PHP, published 2023-04-10T04:15Z)
Description: value: A vulnerability, which was classified as problematic, was found in BestWebSoft Facebook Like Button up to 2.33. Affected is the function fcbkbttn_settings_page of the file facebook-button-plugin.php. The manipulation leads to cross site scripting. It is possible to launch the attack remotely. Upgrading to version 2.34 is able to address this issue. The patch is identified as b766da8fa100779409a953f0e46c2a2448cbe99c. It is recommended to upgrade the affected component. VDB-225354 is the identifier assigned to this vulnerability.
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/facebook-button-plugin
Files changed:
bws_menu/bws_menu.php
facebook-button-plugin.php
readme.txt
Commit message: V2.34 - Security Exploit was fixed.

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


Vulnerable code:
* Version: 1.3.6
				$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>';
						<?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 } ?>
Version: 2.33
			'display_option'		=>	'',
			'fb_img_link'			=>	plugins_url( "images/standart-facebook-ico.png", __FILE__ ),
		if ( 1 == $wpmu )
			$fcbkbttn_options = get_site_option( 'fcbk_bttn_plgn_options' );
		else
			$fcbkbttn_options = get_option( 'fcbk_bttn_plgn_options' );
			if ( stristr( $fcbkbttn_options['fb_img_link'], 'standart-facebook-ico.jpg' ) )
				$fcbkbttn_options['fb_img_link'] = plugins_url( "images/standart-facebook-ico.png", __FILE__ );	
				$fcbkbttn_options['link']			=	$_REQUEST['fcbkbttn_link'];
				if ( 'standart' == $fcbkbttn_options['display_option'] ) {
					$fcbkbttn_options['fb_img_link'] = plugins_url( 'images/standart-facebook-ico.png', __FILE__ );
			$bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? trim( $_POST['bws_license_key'] ) : "";
						$bws_license_plugin = trim( $_POST['bws_license_plugin'] );	
										<option <?php if ( 'standart' == $fcbkbttn_options['display_option'] ) echo 'selected="selected"'; ?> value="standart"><?php _e( "Standard Facebook image", 'facebook' ); ?></option>
		if ( 'standart' == $fcbkbttn_options['display_option'] ) {
			$fb_img_link = plugins_url( 'images/standart-facebook-ico.png', __FILE__ );
Tested up to: 4.0-beta2
Stable tag: 2.33

Fixed code:
* Version: 1.3.7
				$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 ( ! 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 }
						} ?>
Version: 2.34
			'display_option'		=>	'standard',
			'fb_img_link'			=>	plugins_url( "images/standard-facebook-ico.png", __FILE__ ),
		$fcbkbttn_options = ( 1 == $wpmu ) ? get_site_option( 'fcbk_bttn_plgn_options' ) : get_option( 'fcbk_bttn_plgn_options' );
			if ( stristr( $fcbkbttn_options['fb_img_link'], 'standart-facebook-ico.jpg' ) || stristr( $fcbkbttn_options['fb_img_link'], 'standart-facebook-ico.png' ) )
				$fcbkbttn_options['fb_img_link'] = plugins_url( "images/standard-facebook-ico.png", __FILE__ );	

			if ( 'standart' == $fcbkbttn_options['display_option'] )
				$fcbkbttn_options['display_option'] = 'standard';
				$fcbkbttn_options['link']			=	stripslashes( esc_html( $_REQUEST['fcbkbttn_link'] ) );
				if ( 'standard' == $fcbkbttn_options['display_option'] ) {
					$fcbkbttn_options['fb_img_link'] = plugins_url( 'images/standard-facebook-ico.png', __FILE__ );
			$bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? stripslashes( esc_html( trim( $_POST['bws_license_key'] ) ) ) : "";
						$bws_license_plugin = stripslashes( esc_html( $_POST['bws_license_plugin'] ) );	
										<option <?php if ( 'standard' == $fcbkbttn_options['display_option'] ) echo 'selected="selected"'; ?> value="standard"><?php _e( "Standard Facebook image", 'facebook' ); ?></option>
		if ( 'standard' == $fcbkbttn_options['display_option'] ) {
			$fb_img_link = plugins_url( 'images/standard-facebook-ico.png', __FILE__ );
Tested up to: 4.0-beta3
Stable tag: 2.34
= V2.34 - 13.08.2014 =
* Budfix : Security Exploit was fixed.

= V2.34 =
Security Exploit was fixed.