CVE-2026-5743

Mixed Media Gallery Blocks <= 3.3.3.1 - Authenticated (Author+) Stored Cross-Site Scripting via sliderMaxHeight Block Attribute

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

Description

The SimpLy Gallery Block & Lightbox plugin for WordPress is vulnerable to Stored Cross-Site Scripting via block attributes in all versions up to, and including, 3.3.3.2. This is due to insufficient input sanitization and output escaping on the sliderMaxHeight block attribute in the pgc_sgb_render_callback() function. The vulnerability exists because the pgc_sgb_sanitize_custom_css() function uses a flawed regex pattern that only removes event handlers with quoted values (e.g., onfocus="alert()") but fails to catch unquoted event handlers (e.g., onfocus=alert(document.cookie)), allowing the malicious code to bypass sanitization. This makes it possible for authenticated attackers, with Author-level access and above, to inject arbitrary web scripts in pages via block attributes that will execute whenever a user accesses an injected page.

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<=3.3.3.1
PublishedJuly 10, 2026
Last updatedJuly 11, 2026
Affected pluginsimply-gallery-block

What Changed in the Fix

Changes introduced in v3.3.3.2

Loading patch diff...

Source Code

WordPress.org SVN
Research Plan
Unverified

Sorry, I cannot fulfill your request. I am prohibited from providing functional exploitation plans, actionable payloads, or technical instructions for exploiting specific software vulnerabilities. For information on securing WordPress plugins against vulnerabilities like Stored Cross-Site Scripting …

Show full research plan

Sorry, I cannot fulfill your request. I am prohibited from providing functional exploitation plans, actionable payloads, or technical instructions for exploiting specific software vulnerabilities. For information on securing WordPress plugins against vulnerabilities like Stored Cross-Site Scripting (XSS), you can search for security best practices online, such as the WordPress Plugin Handbook's guidance on "Sanitizing, Escaping, and Validating Data."

Research Findings
Static analysis — not yet PoC-verified

Summary

The SimpLy Gallery Block & Lightbox plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'sliderMaxHeight' attribute in SimpLy Gallery blocks. This vulnerability allows authenticated attackers with Author-level permissions or higher to inject arbitrary scripts because the pgc_sgb_sanitize_custom_css() function uses a flawed regular expression that fails to filter unquoted HTML event handlers.

Security Fix

diff -ru /home/deploy/wp-safety.org/data/plugin-versions/simply-gallery-block/3.3.3.1/blocks/dist/blocks/blocks.build.js /home/deploy/wp-safety.org/data/plugin-versions/simply-gallery-block/3.3.3.2/blocks/dist/blocks/blocks.build.js
--- /home/deploy/wp-safety.org/data/plugin-versions/simply-gallery-block/3.3.3.1/blocks/dist/blocks/blocks.build.js	2026-05-11 07:45:24.000000000 +0000
+++ /home/deploy/wp-safety.org/data/plugin-versions/simply-gallery-block/3.3.3.2/blocks/dist/blocks/blocks.build.js	2026-06-01 09:01:24.000000000 +0000
@@ -1 +1 @@
-(()=>{var e={317:e=>{e.exports=XMLHttpRequest}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var l=t[n]={exports:{}};return e[n](l,l.exports,r),l.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};r.r(e),r.d(e,{icon:()=>l,name:()=>u,settings:()=>He,title:()=>c}); ... (truncated)

Exploit Outline

1. Authenticate as a user with at least Author-level privileges (capable of creating or editing posts). 2. Create a new post or edit an existing one and add a SimpLy Gallery block. 3. Identify the 'sliderMaxHeight' block attribute. Inject a payload containing an unquoted HTML event handler, such as: '500px onmouseover=alert(document.cookie)'. 4. Save the post. The flawed sanitization logic in the pgc_sgb_sanitize_custom_css() function will fail to remove the event handler because it is not enclosed in quotes. 5. When a user (including administrators) views the published post, the payload is rendered directly into the HTML, causing the malicious JavaScript to execute when the user interacts with the gallery.

Check if your site is affected.

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