CVE-2025-13641: CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') in smub Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery
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 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.
AI Analysis
Technical Summary
CVE-2025-13641 is a Local File Inclusion vulnerability categorized under CWE-98, affecting the NextGEN Gallery WordPress plugin, specifically versions up to and including 3.59.12. The vulnerability stems from insufficient validation of the 'template' shortcode parameter, which accepts absolute file paths without proper sanitization or restriction. Authenticated users with Contributor-level permissions or higher can exploit this flaw by supplying crafted input to the 'template' parameter, causing the plugin to include and execute arbitrary PHP files on the server. This inclusion bypasses typical web server restrictions such as .htaccess rules, enabling attackers to execute code within the WordPress environment. While the vulnerability itself is LFI, it can lead to remote code execution if combined with other vulnerabilities, such as arbitrary file upload flaws. The CVSS v3.1 score is 8.8 (high), reflecting the network attack vector, low attack complexity, required privileges (low), no user interaction, and high impact on confidentiality, integrity, and availability. Although no known exploits are currently reported in the wild, the vulnerability poses a significant risk due to the widespread use of NextGEN Gallery in WordPress sites and the potential for privilege escalation and full system compromise.
Potential Impact
The impact of CVE-2025-13641 is substantial for organizations using the NextGEN Gallery plugin. Successful exploitation allows attackers with relatively low privileges (Contributor-level) to execute arbitrary PHP code, potentially leading to full site compromise, data theft, defacement, or pivoting to other parts of the network. Confidentiality is at risk due to possible information disclosure via included files. Integrity and availability can be severely affected through code execution, enabling attackers to modify site content, inject malicious payloads, or disrupt service. The ability to bypass .htaccess restrictions increases the attack surface and complicates mitigation. Organizations relying on WordPress for critical business functions or hosting sensitive data are particularly vulnerable. The widespread deployment of WordPress and popularity of NextGEN Gallery amplify the potential scale of impact globally.
Mitigation Recommendations
To mitigate CVE-2025-13641, organizations should immediately update the NextGEN Gallery plugin to a version where this vulnerability is patched once available. Until a patch is released, restrict Contributor-level and higher permissions to trusted users only, minimizing the risk of exploitation. Implement Web Application Firewall (WAF) rules to detect and block attempts to exploit the 'template' shortcode parameter with suspicious absolute paths. Harden WordPress installations by disabling PHP execution in upload directories and restricting file inclusion paths via server configuration where possible. Conduct regular audits of user privileges and monitor logs for unusual shortcode usage patterns. Additionally, consider employing security plugins that can detect anomalous file inclusions or code execution attempts. Educate site administrators about the risks of granting Contributor or higher roles without strict controls. Finally, maintain regular backups to enable recovery in case of compromise.
Affected Countries
United States, Germany, United Kingdom, Canada, Australia, France, India, Brazil, Japan, Netherlands, Italy, Spain
CVE-2025-13641: CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') in smub Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery
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 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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2025-13641 is a Local File Inclusion vulnerability categorized under CWE-98, affecting the NextGEN Gallery WordPress plugin, specifically versions up to and including 3.59.12. The vulnerability stems from insufficient validation of the 'template' shortcode parameter, which accepts absolute file paths without proper sanitization or restriction. Authenticated users with Contributor-level permissions or higher can exploit this flaw by supplying crafted input to the 'template' parameter, causing the plugin to include and execute arbitrary PHP files on the server. This inclusion bypasses typical web server restrictions such as .htaccess rules, enabling attackers to execute code within the WordPress environment. While the vulnerability itself is LFI, it can lead to remote code execution if combined with other vulnerabilities, such as arbitrary file upload flaws. The CVSS v3.1 score is 8.8 (high), reflecting the network attack vector, low attack complexity, required privileges (low), no user interaction, and high impact on confidentiality, integrity, and availability. Although no known exploits are currently reported in the wild, the vulnerability poses a significant risk due to the widespread use of NextGEN Gallery in WordPress sites and the potential for privilege escalation and full system compromise.
Potential Impact
The impact of CVE-2025-13641 is substantial for organizations using the NextGEN Gallery plugin. Successful exploitation allows attackers with relatively low privileges (Contributor-level) to execute arbitrary PHP code, potentially leading to full site compromise, data theft, defacement, or pivoting to other parts of the network. Confidentiality is at risk due to possible information disclosure via included files. Integrity and availability can be severely affected through code execution, enabling attackers to modify site content, inject malicious payloads, or disrupt service. The ability to bypass .htaccess restrictions increases the attack surface and complicates mitigation. Organizations relying on WordPress for critical business functions or hosting sensitive data are particularly vulnerable. The widespread deployment of WordPress and popularity of NextGEN Gallery amplify the potential scale of impact globally.
Mitigation Recommendations
To mitigate CVE-2025-13641, organizations should immediately update the NextGEN Gallery plugin to a version where this vulnerability is patched once available. Until a patch is released, restrict Contributor-level and higher permissions to trusted users only, minimizing the risk of exploitation. Implement Web Application Firewall (WAF) rules to detect and block attempts to exploit the 'template' shortcode parameter with suspicious absolute paths. Harden WordPress installations by disabling PHP execution in upload directories and restricting file inclusion paths via server configuration where possible. Conduct regular audits of user privileges and monitor logs for unusual shortcode usage patterns. Additionally, consider employing security plugins that can detect anomalous file inclusions or code execution attempts. Educate site administrators about the risks of granting Contributor or higher roles without strict controls. Finally, maintain regular backups to enable recovery in case of compromise.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Wordfence
- Date Reserved
- 2025-11-25T02:50:31.614Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6943cc484eb3efac36794b0f
Added to database: 12/18/2025, 9:41:28 AM
Last enriched: 2/27/2026, 10:06:01 AM
Last updated: 3/25/2026, 2:53:31 AM
Views: 137
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.