CVE-2025-13641
Published: 18 December 2025
Description
The Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery plugin for WordPress is vulnerable to Local File Inclusion in all versions up to, and including, 3.59.12 via the 'template' shortcode parameter. This is due to insufficient path validation that…
more
allows absolute paths to be provided. This makes it possible for authenticated attackers, with Contributor-level access and above, to include and execute arbitrary PHP files on the server, bypassing web server restrictions like .htaccess. Successful exploitation could lead to information disclosure, code execution in the WordPress context, and potential remote code execution if combined with arbitrary file upload capabilities.
Mitigating Controls (NIST 800-53 r5)AI
Remediates the specific LFI flaw in the NextGEN Gallery plugin by identifying, prioritizing, and patching the insufficient path validation in the 'template' shortcode parameter.
Enforces input validation at entry points like the 'template' shortcode parameter to block absolute paths and prevent arbitrary PHP file inclusion.
Applies least privilege to restrict Contributor-level users from exploiting the vulnerable shortcode, limiting the attack surface to higher-privileged roles.
Security SummaryAI
CVE-2025-13641 is a Local File Inclusion (LFI) vulnerability affecting the Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery plugin for WordPress in all versions up to and including 3.59.12. The flaw arises from insufficient path validation in the 'template' shortcode parameter, which permits the use of absolute paths. This issue is cataloged under CWE-98 and carries a CVSS v3.1 base score of 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
Authenticated attackers with Contributor-level access or higher can exploit this vulnerability over the network with low complexity. By supplying a malicious absolute path via the 'template' parameter, they can include and execute arbitrary PHP files on the server, circumventing web server restrictions such as .htaccess. Exploitation may result in information disclosure, code execution within the WordPress context, and potential remote code execution if paired with arbitrary file upload features.
References include source code locations in Controller.php and LegacyTemplateLocator.php, a changeset 3415575 applying fixes to LegacyTemplateLocator.php, and Wordfence threat intelligence detailing the vulnerability (ID: 0a01e1c9-67f4-4cc1-b58b-9cc141889d66). Security practitioners should review these for patch details and update to a remediated version of the plugin.
Details
- CWE(s)
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
LFI vulnerability in public-facing WordPress plugin enables remote exploitation of web application (T1190) and arbitrary local file reads for data disclosure (T1005).