Photo Gallery for Images Security & Risk Analysis

wordpress.org/plugins/new-photo-gallery

Display photos in responsive grid and lightbox layouts. Build image galleries, portfolios, and video galleries.

2K active installs v1.5.4 PHP 7.0+ WP 4.0+ Updated Dec 29, 2025
image-gallerylightbox-galleryphoto-galleryportfolio-galleryresponsive-gallery
98
A · Safe
CVEs total1
Unpatched0
Last CVEApr 29, 2024
Safety Verdict

Is Photo Gallery for Images Safe to Use in 2026?

Generally Safe

Score 98/100

Photo Gallery for Images has a strong security track record. Known vulnerabilities have been patched promptly.

1 known CVELast CVE: Apr 29, 2024Updated 3mo ago
Risk Assessment

The 'new-photo-gallery' plugin v1.5.4 exhibits a mixed security posture. On the positive side, it demonstrates good practices with 100% of SQL queries using prepared statements, a high rate of output escaping (96%), and robust nonce and capability checks (7 and 17 respectively). The attack surface, while present with one AJAX handler and one shortcode, appears to be entirely protected by authentication, with zero unprotected entry points identified. However, the presence of the `unserialize` dangerous function is a significant concern, as it can lead to Remote Code Execution (RCE) if not handled with extreme caution and input validation. The taint analysis showing two flows with unsanitized paths, though not classified as critical or high, suggests potential avenues for exploitation related to how data is processed before serialization or deserialization.

The plugin's vulnerability history, specifically one high-severity CVE related to 'Deserialization of Untrusted Data,' directly aligns with the static analysis findings regarding `unserialize`. The fact that this vulnerability is now patched is a good sign, but the recurring theme highlights a persistent risk area. The overall conclusion is that while the plugin has made significant strides in secure coding practices, the `unserialize` function and the identified unsanitized paths demand continued vigilance and potentially further code review to ensure all deserialization operations are strictly controlled and sanitized to prevent future exploits, especially given the plugin's past high-severity issues in this domain.

Key Concerns

  • Presence of dangerous function: unserialize
  • Taint flow with unsanitized paths (2)
  • Vulnerability history: 1 high severity CVE
Vulnerabilities
1

Photo Gallery for Images Security Vulnerabilities

CVEs by Year

1 CVE in 2024
2024
Patched Has unpatched

Severity Breakdown

High
1

1 total CVE

CVE-2024-1896high · 7.5Deserialization of Untrusted Data

Photo Gallery <= 1.4.2 - Authenticated(Contributor+) PHP Object Injection via Shortcode

Apr 29, 2024 Patched in 1.4.3 (23d)
Code Analysis
Analyzed Mar 16, 2026

Photo Gallery for Images Code Analysis

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

Dangerous Functions Found

unserialize$hash = unserialize(file_get_contents("https://vimeo.com/api/v2/video/$Vvid.php"));output.php:108

Output Escaping

96% escaped363 total outputs
Data Flows
2 unsanitized

Data Flow Analysis

2 flows2 with unsanitized paths
_ajax_light_image_gallery (new-photo-gallery.php:334)
Source (user input) Sink (dangerous op) Sanitizer Transform Unsanitized Sanitized
Attack Surface

Photo Gallery for Images Attack Surface

Entry Points2
Unprotected0

AJAX Handlers 1

authwp_ajax_photo_gallery_jsnew-photo-gallery.php:77

Shortcodes 1

[NPG] shortcode.php:10
WordPress Hooks 37
actioninitclass-tgm-plugin-activation.php:268
filterload_textdomain_mofileclass-tgm-plugin-activation.php:269
actioninitclass-tgm-plugin-activation.php:272
actionadmin_menuclass-tgm-plugin-activation.php:421
actionadmin_headclass-tgm-plugin-activation.php:422
filterinstall_plugin_complete_actionsclass-tgm-plugin-activation.php:425
filterupdate_plugin_complete_actionsclass-tgm-plugin-activation.php:426
actionadmin_noticesclass-tgm-plugin-activation.php:429
actionadmin_initclass-tgm-plugin-activation.php:430
actionadmin_enqueue_scriptsclass-tgm-plugin-activation.php:431
actionload-plugins.phpclass-tgm-plugin-activation.php:436
actionswitch_themeclass-tgm-plugin-activation.php:439
actionswitch_themeclass-tgm-plugin-activation.php:442
actionadmin_initclass-tgm-plugin-activation.php:447
actionswitch_themeclass-tgm-plugin-activation.php:452
actionload_textdomain_mofileclass-tgm-plugin-activation.php:475
filterupgrader_source_selectionclass-tgm-plugin-activation.php:889
actionplugins_loadedclass-tgm-plugin-activation.php:2132
filtertgmpa_table_data_itemsclass-tgm-plugin-activation.php:2256
filterupgrader_source_selectionclass-tgm-plugin-activation.php:2997
actionadmin_initclass-tgm-plugin-activation.php:3167
actionupgrader_process_completeclass-tgm-plugin-activation.php:3262
filterupgrader_post_installclass-tgm-plugin-activation.php:3321
filterupgrader_post_installclass-tgm-plugin-activation.php:3470
actioninitnew-photo-gallery.php:63
actionadmin_menunew-photo-gallery.php:66
actioninitnew-photo-gallery.php:69
actionadd_meta_boxesnew-photo-gallery.php:72
actionadmin_initnew-photo-gallery.php:75
actionsave_postnew-photo-gallery.php:78
filterwidget_textnew-photo-gallery.php:81
filtermanage__light_image_gallery_posts_columnsnew-photo-gallery.php:84
actionmanage__light_image_gallery_posts_custom_columnnew-photo-gallery.php:87
actionwp_enqueue_scriptsnew-photo-gallery.php:89
actionadmin_enqueue_scriptsnew-photo-gallery.php:92
actionwp_enqueue_scriptsnew-photo-gallery.php:513
actiontgmpa_registernew-photo-gallery.php:517
Maintenance & Trust

Photo Gallery for Images Maintenance & Trust

Maintenance Signals

WordPress version tested6.9.4
Last updatedDec 29, 2025
PHP min version7.0
Downloads161K

Community Trust

Rating98/100
Number of ratings14
Active installs2K
Developer Profile

Photo Gallery for Images Developer Profile

A WP Life

61 plugins · 64K total installs

77
trust score
Avg Security Score
97/100
Avg Patch Time
267 days
View full developer profile
Detection Fingerprints

How We Detect Photo Gallery for Images

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

Asset Fingerprints

Asset Paths
/wp-content/plugins/new-photo-gallery/js/colorbox/jquery.colorbox-min.js/wp-content/plugins/new-photo-gallery/js/script.js/wp-content/plugins/new-photo-gallery/css/style.css/wp-content/plugins/new-photo-gallery/css/colorbox/colorbox.css
Script Paths
/wp-content/plugins/new-photo-gallery/js/colorbox/jquery.colorbox-min.js/wp-content/plugins/new-photo-gallery/js/script.js/wp-content/plugins/new-photo-gallery/js/colorbox/jquery.colorbox.js
Version Parameters
new-photo-gallery/js/colorbox/jquery.colorbox-min.js?ver=new-photo-gallery/js/script.js?ver=new-photo-gallery/css/style.css?ver=new-photo-gallery/css/colorbox/colorbox.css?ver=

HTML / DOM Fingerprints

CSS Classes
photo-gallery-items-containernpg-gallery-itemnpg-gallery-thumb
HTML Comments
<!-- New Photo Gallery --><!-- Admin Area --><!-- Front End Area -->
Data Attributes
id="light-image-gallery-shortcode-onclick="return PHOTOCopyShortcodeid='copy-msg-data-lightbox="gallery-data-title="
JS Globals
PHOTOCopyShortcodenpg_gallery_lightbox
Shortcode Output
[NPG id=<input type='text' class='button button-primary' id='light-image-gallery-shortcode-value='[NPG id=onclick='return PHOTOCopyShortcode
FAQ

Frequently Asked Questions about Photo Gallery for Images