Gallery Widget Security & Risk Analysis

wordpress.org/plugins/gallery-widget

Simple widget to show the latest/random images of the WordPress media library as a Widget, using a shortcode or directly with a php-function.

500 active installs v1.2.1 PHP + WP 2.8+ Updated Mar 18, 2011
attachmentgalleryimagemediawidget
63
C · Use Caution
CVEs total1
Unpatched1
Last CVEJul 4, 2025
Safety Verdict

Is Gallery Widget Safe to Use in 2026?

Use With Caution

Score 63/100

Gallery Widget has 1 unpatched vulnerability. Evaluate alternatives or apply available mitigations.

1 known CVE 1 unpatched Last CVE: Jul 4, 2025Updated 15yr ago
Risk Assessment

The 'gallery-widget' plugin version 1.2.1 exhibits a mixed security posture. On the positive side, the static analysis shows no direct entry points without authentication checks, and all identified SQL queries utilize prepared statements, which is a strong indicator against SQL injection vulnerabilities arising from direct query construction. The absence of external HTTP requests and file operations further limits the plugin's ability to interact with the broader environment in potentially insecure ways. However, several concerning signals are present. The use of `create_function` is a significant red flag, as it can lead to code execution vulnerabilities if user-supplied input is ever used within its arguments, though the current taint analysis does not indicate any immediate exploitation of this. A substantial concern is the low percentage of properly escaped output (23%), which suggests a high likelihood of Cross-Site Scripting (XSS) vulnerabilities, allowing attackers to inject malicious scripts into pages where the widget is displayed. Furthermore, the complete absence of nonce checks and capability checks on its entry points means that any authenticated user could potentially trigger plugin actions without proper authorization validation.

The plugin's vulnerability history is particularly worrying. It has a known medium-severity CVE, which is currently unpatched. The fact that the last vulnerability was dated 2025-07-04 and is still unpatched indicates a lack of ongoing maintenance and a significant risk of exploitation. The historical pattern of SQL injection vulnerabilities, even if addressed in current queries, suggests that developers may not have a robust understanding of secure coding practices for database interactions. Overall, while the plugin has strengths in its handling of SQL and its limited attack surface, the combination of unescaped output, missing authorization checks, the dangerous `create_function`, and a currently unpatched CVE makes it a significant security risk.

Key Concerns

  • Unpatched CVE
  • Low output escaping percentage
  • Dangerous function create_function
  • Missing nonce checks
  • Missing capability checks
Vulnerabilities
1

Gallery Widget Security Vulnerabilities

CVEs by Year

1 CVE in 2025 · unpatched
2025
Patched Has unpatched

Severity Breakdown

Medium
1

1 total CVE

CVE-2025-28969medium · 6.5Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Gallery Widget <= 1.2.1 - Authenticated (Contributor+) SQL Injection

Jul 4, 2025Unpatched
Code Analysis
Analyzed Mar 16, 2026

Gallery Widget Code Analysis

Dangerous Functions
1
Raw SQL Queries
0
4 prepared
Unescaped Output
54
16 escaped
Nonce Checks
0
Capability Checks
0
File Operations
0
External Requests
0
Bundled Libraries
0

Dangerous Functions Found

create_functionadd_action('widgets_init', create_function('', 'return register_widget("GalleryWidgetObject");'));GalleryWidgetObject.php:195

SQL Query Safety

100% prepared4 total queries

Output Escaping

23% escaped70 total outputs
Data Flows
All sanitized

Data Flow Analysis

1 flows
getAttachedImagesByCategories (gallery_widget.php:159)
Source (user input) Sink (dangerous op) Sanitizer Transform Unsanitized Sanitized
Attack Surface

Gallery Widget Attack Surface

Entry Points2
Unprotected0

Shortcodes 2

[getGWImages] gallery_widget.php:45
[getGWImages2] gallery_widget.php:46
WordPress Hooks 2
actionwidgets_initGalleryWidgetObject.php:195
actionafter_plugin_rowgallery_widget.php:47
Maintenance & Trust

Gallery Widget Maintenance & Trust

Maintenance Signals

WordPress version tested3.1.0
Last updatedMar 18, 2011
PHP min version
Downloads83K

Community Trust

Rating80/100
Number of ratings2
Active installs500
Developer Profile

Gallery Widget Developer Profile

cybio

2 plugins · 510 total installs

76
trust score
Avg Security Score
74/100
Avg Patch Time
30 days
View full developer profile
Detection Fingerprints

How We Detect Gallery Widget

Patterns used to identify this plugin on WordPress sites during automated security audits and web crawling.

Asset Fingerprints

Asset Paths
/wp-content/plugins/gallery-widget/gallery-widget.php
Version Parameters
gallery-widget/gallery-widget.php?ver=

HTML / DOM Fingerprints

Shortcode Output
[getGWImages[getGWImages2
FAQ

Frequently Asked Questions about Gallery Widget