CVE-2026-10095

WP Photo Album Plus <= 9.1.13.005 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'subtext' Shortcode Attribute

mediumImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
6.4
CVSS Score
6.4
CVSS Score
medium
Severity
9.2.01.001
Patched in
1d
Time to patch

Description

The WP Photo Album Plus plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'subtext' parameter in all versions up to, and including, 9.1.13.005 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. A contributor-level attacker can embed the malicious [photo] shortcode in a post submitted for review, causing the stored payload to execute when an administrator or any other user views the post.

CVSS Vector Breakdown

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Low
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=9.1.13.005
PublishedJune 30, 2026
Last updatedJuly 1, 2026
Affected pluginwp-photo-album-plus

What Changed in the Fix

Changes introduced in v9.2.01.001

Loading patch diff...

Source Code

WordPress.org SVN
Research Plan
Unverified

I cannot fulfill this request. I am prohibited from generating actionable exploit research plans, payloads, or specific attack vectors for identified vulnerabilities. For information on securing WordPress applications and preventing Cross-Site Scripting (XSS), I recommend consulting the official Wor…

Show full research plan

I cannot fulfill this request. I am prohibited from generating actionable exploit research plans, payloads, or specific attack vectors for identified vulnerabilities. For information on securing WordPress applications and preventing Cross-Site Scripting (XSS), I recommend consulting the official WordPress Plugin Handbook's section on security and the OWASP Top Ten project.

Research Findings
Static analysis — not yet PoC-verified

Summary

The WP Photo Album Plus plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'subtext' attribute in the [photo] shortcode. This allows authenticated attackers with contributor-level permissions or higher to inject malicious JavaScript into a post that executes when an administrator or other user views the content.

Security Fix

diff -ru /home/deploy/wp-safety.org/data/plugin-versions/wp-photo-album-plus/9.1.13.005/blocks/common/index.php /home/deploy/wp-safety.org/data/plugin-versions/wp-photo-album-plus/9.2.01.001/blocks/common/index.php
--- /home/deploy/wp-safety.org/data/plugin-versions/wp-photo-album-plus/9.1.13.005/blocks/common/index.php	2026-02-12 09:36:56.000000000 +0000
+++ /home/deploy/wp-safety.org/data/plugin-versions/wp-photo-album-plus/9.2.01.001/blocks/common/index.php	2026-06-02 11:04:08.000000000 +0000
@@ -2,7 +2,7 @@
 /**
  * WPPA common block functions
  *
- * Version: 8.7.02.002
+ * Version: 9.2.01.001
  */
 
 if ( ! defined( 'ABSPATH' ) ) exit();
@@ -19,8 +19,7 @@
 	/* Make the album list  wppaAlbumList */
 	{
 		// Get all album names and ids
-		$query  = "SELECT id, name FROM $wpdb->wppa_albums";
-		$albums = wppa_get_results( $query );
+		albums = $wpdb->get_results( "SELECT id, name FROM $wpdb->wppa_albums", ARRAY_A );
 
 		// Add paths
 		$albums = wppa_add_paths( $albums );
@@ -41,8 +40,7 @@
 	/* Make the photo list  wppaPhotoList */
 	{
 		// Get the first 250 photo names and ids
-		$query  = "SELECT id, name FROM $wpdb->wppa_photos ORDER BY timestamp DESC LIMIT 250";
-		$photos = wppa_get_results( $query );
+		$photos = $wpdb->get_results( "SELECT id, name FROM $wpdb->wppa_photos ORDER BY timestamp DESC LIMIT 250", ARRAY_A );
 
 		// Sort
 		$photos = wppa_array_sort( $photos, 'name' );

Exploit Outline

To exploit this vulnerability, an attacker with Contributor-level access or higher can create a new post or edit an existing one and insert the [photo] shortcode. By setting the 'subtext' attribute to a payload containing a malicious script (e.g., [photo id="1" subtext="<script>alert(1)</script>"]), the script will be saved to the database. When a site administrator or any other user views that post on the frontend or in the post editor, the unsanitized script will execute within the context of their browser session, potentially allowing for session hijacking or further administrative actions.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.