Medium

Photo Gallery by FooGallery : Responsive Image Gallery, Masonry Gallery & Carousel <= 3.1.31 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'custom_attribute_key' Shortcode Parameter

  • Disclosed: 12.06.2026
  • Updated: 11.10.2026 10:23

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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
WordPress plugin FooGallery Photo Gallery : Image, Video & Masonry Galleries <= 3.1.31 3.1.32

References

CVSS score 6.4/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Weakness (CWE)
CWE-79
Platform
WordPress
Package
FooGallery Photo Gallery : Image, Video & Masonry Galleries
Disclosed
12.06.2026
Updated
11.10.2026 10:23

Sources and licenses

Wordfence Intelligence - dd9650e6-7c3c-4510-9749-a3503924855f - Wordfence Intelligence

Copyright 1999-2026 The MITRE Corporation

Copyright 2012-2026 Defiant Inc.

This record contains material that is subject to copyright

Copyright 1999-2026 The MITRE Corporation

CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE®). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy.

https://www.cve.org/Legal/TermsOfUse
Copyright 2012-2026 Defiant Inc.

Defiant hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute this software vulnerability information. Any copy of the software vulnerability information you make for such purposes is authorized provided that you include a hyperlink to this vulnerability record and reproduce Defiant's copyright designation and this license in any such copy.

https://www.wordfence.com/wordfence-intelligence-terms-and-conditions/
Wordfence Intelligence
Wordfence Intelligence - Defiant, Inc.
Copyright Defiant, Inc. All rights reserved except as granted below.
License grant, section 3.1 of the Wordfence Intelligence Terms and Conditions (January 26, 2026):

Subject to this Agreement, Company hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the Service. Any copy you make for such purposes is authorized provided that you reproduce Company’s copyright designation, this license, and the license of any disclosed Company licensor in any such copy.

Full applicable Agreement: https://www.wordfence.com/wordfence-intelligence-terms-and-conditions/

Vulnerability history: FooGallery Photo Gallery : Image, Video & Masonry Galleries

All published vulnerabilities of this package (WordPress plugin), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (25) in the archive
Total entries
25
First → latest
02.2019 09.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 3
  • Medium 22

Disclosures per year

  1. 2019: 1
  2. 2020: 2
  3. 2021: 1
  4. 2022: 1
  5. 2023: 4
  6. 2024: 6
  7. 2025: 4
  8. 2026: 6
Severity:
  1. Photo Gallery by FooGallery : Responsive Image Gallery, Masonry Gallery & Carousel <= 3.1.31 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'custom_attribute_key' Shortcode Parameter this entry
    Medium · 6.4 CVE-2026-9134 <= 3.1.31 3.1.32
  2. High · 7.2 CVE-2023-44244 < 2.3.2 2.3.2
  3. High · 8.3 42b24b41-c520-4bb8-ba56-6f35500ee90e < 1.9.25 1.9.25
  4. High · 8.8 3fda31fa-efc9-44b9-99ba-9e3e23aa2ee0 < 1.6.17 1.6.17

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.