CVE-2026-4766
Stored XSS in Easy Image Gallery WordPress Plugin Allows Script Injection
Publication date: 2026-03-25
Last updated on: 2026-03-25
Assigner: Wordfence
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| wordfence | easy_image_gallery | to 1.5.3 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-79 | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
The Easy Image Gallery plugin for WordPress is vulnerable to Stored Cross-Site Scripting (XSS) through the Gallery shortcode post meta field in all versions up to and including 1.5.3.
This vulnerability arises because the plugin does not properly sanitize or escape user-supplied input in the gallery shortcode values.
As a result, authenticated users with Contributor-level access or higher can inject malicious scripts into pages via the gallery shortcode, which then execute whenever any user views the affected page.
How can this vulnerability impact me? :
This vulnerability allows attackers with Contributor-level or higher access to inject arbitrary web scripts into pages using the gallery shortcode.
When other users visit these pages, the injected scripts execute in their browsers, potentially leading to session hijacking, defacement, data theft, or other malicious actions.
Because the attack is stored, the malicious script persists on the site until removed, affecting all visitors to the compromised pages.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': "This vulnerability involves Stored Cross-Site Scripting (XSS) via the Easy Image Gallery WordPress plugin's gallery shortcode post meta field. Detection involves identifying posts that contain the vulnerable shortcode or gallery meta data that may include malicious scripts."}, {'type': 'paragraph', 'content': "You can detect the presence of the Easy Image Gallery shortcode in WordPress posts by searching the post content for the shortcode '[easy_image_gallery]'. Additionally, checking the post meta fields '_easy_image_gallery' or '_easy_image_gallery_v2' for suspicious or unexpected script content can help identify exploitation."}, {'type': 'paragraph', 'content': 'Suggested commands to detect the vulnerability on your WordPress system include:'}, {'type': 'list_item', 'content': "Using WP-CLI to search posts containing the shortcode: wp post list --post_type=post,page --field=ID | xargs -I % wp post get % --field=post_content | grep '\\[easy_image_gallery'"}, {'type': 'list_item', 'content': "Querying the database directly to find posts with the vulnerable meta fields containing suspicious scripts: SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key IN ('_easy_image_gallery', '_easy_image_gallery_v2') AND meta_value LIKE '%<script>%';"}, {'type': 'paragraph', 'content': 'Monitoring HTTP traffic for unusual script injections or unexpected JavaScript execution on pages that include galleries may also help detect exploitation attempts.'}] [1, 2]
What immediate steps should I take to mitigate this vulnerability?
To mitigate this Stored Cross-Site Scripting vulnerability in the Easy Image Gallery plugin, the immediate step is to update the plugin to a version later than 1.5.3 where the issue is fixed.
If an update is not immediately possible, consider temporarily disabling the Easy Image Gallery plugin to prevent exploitation.
Additionally, review and sanitize any user-supplied gallery shortcode post meta fields to remove malicious scripts.
Limit Contributor-level and higher user permissions to trusted users only, as the vulnerability requires authenticated users with at least Contributor access.
Monitor your site for suspicious activity and consider implementing Web Application Firewall (WAF) rules to block attempts to inject scripts via the gallery shortcode.