CVE-2025-13641CWE-98

Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery <= 3.59.12 - Authenticated (Contributor+) Local File Inclusion via 'template'

High · published December 18, 2025

CVSS v3.1
8.8
EPSS
1%
Percentile
54.5
In the wild
Unconfirmed
What it is

🚨 A crafty use of the 'template' shortcode in NextGEN Gallery can let attackers slip through the back door! 🔥 Think of it like a restaurant that allows diners to bring their own ingredients into the kitchen but fails to check if those ingredients are safe. Here, an attacker can serve their own recipe straight from the server, creating a potential feast of chaos. An authenticated attacker with Contributor-level access could pull in and execute any PHP file they want, bypassing web server protections like .htaccess. This could lead to a devastating data breach, unauthorized access to your site, and even remote code execution if they can upload malicious files. It's not just a bad dinner guest; it's an entire food fight in your kitchen!

Put simply

Think of it like a restaurant that allows diners to bring their own ingredients into the kitchen but fails to check if those ingredients are safe. Here, an attacker can serve their own recipe straight from the server, creating a potential feast of chaos. This Local File Inclusion vulnerability in the NextGEN Gallery plugin stems from insufficient path validation in the 'template' shortcode parameter, allowing absolute paths to be specified. It opens the door for authenticated users to include arbitrary PHP files on the server.

What to do

An authenticated attacker with Contributor-level access could pull in and execute any PHP file they want, bypassing web server protections like .htaccess. This could lead to a devastating data breach, unauthorized access to your site, and even remote code execution if they can upload malicious files. It's not just a bad dinner guest; it's an entire food fight in your kitchen! To protect your WordPress site, immediately update the NextGEN Gallery plugin to version 3.59.13 or later. Additionally, review permissions for Contributor-level users and consider restricting access to sensitive areas of your site to limit exposure. You've got this! With a quick update and some careful management, you’ll keep your site secure. 🛡️

The record
Technical detail
CVSS v3.1
8.8 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00751 · 54.5th percentile
Weakness
CWE-98 · Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion')
Published
2025-12-18T09:21Z
EPSS history
Timeline
  • 18 DEC 09:21Z
    Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery <= 3.59.12 - Authenticated (Contributor+) Local File Inclusion via 'template'
    cvelistv5