Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery <= 4.5.2 - Authenticated (Contributor+) PHP Object Injection via Shortcode Template Attribute

High 7.5 CWE-502Fixed in 4.5.3
ID
WPSEC-2026-1125
Plugin
Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery (nextgen-gallery)
Affected
all versions before 4.5.3
Remediation
Update to 4.5.3 or later.
CVSS 3.1
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-502
Usage
Plugin Medium · Affected versions Medium among sites WPSec scans, 2026-10-17
Attack surface
Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery on WPSec AttackSurface
Fix released
Published

Description

The NextGEN Gallery plugin for WordPress is vulnerable to PHP Object Injection via the template shortcode attribute and import folder paths in all versions up to, and including, 4.5.2 due to stream-wrapper paths such as phar:// not being rejected before they reach file_exists() when resolving relative template names. This makes it possible for authenticated attackers, with contributor-level access and above, to trigger deserialization of the metadata of an attacker-supplied Phar archive on sites running PHP 7.4 or earlier. No known POP chain is present in the plugin itself; if a POP chain is present via an additional plugin or theme, this could allow the attacker to delete arbitrary files, retrieve sensitive data, or execute code.

References

Published by WPSec. Provided as is, without warranty. Corrections: contact us.

This advisory as JSON or Markdown · All advisories: JSON, RSS

License: CC BY 4.0