CVE-2025-13641 Path traversal in Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery

High 8.8 Published Updated

Authenticated contributors can exploit a path validation flaw in NextGEN Gallery to include and execute arbitrary PHP files, leading to code execution and information disclosure.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-13641?

CVE-2025-13641 is a high-severity path traversal vulnerability in smub Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery, published on 18 Dec 2025. Any signed-in user can exploit it over the network, with no action from the victim.

Official 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.

Weakness: CWE-98

Which versions are affected by CVE-2025-13641?

How do I fix CVE-2025-13641?

No fix has been published for CVE-2025-13641 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2025-13641 being exploited?

There is no known exploitation of CVE-2025-13641 in the wild and no public exploit code.

Sources

Also known as GHSA-q5wr-jxr7-gxfv.

Is CVE-2025-13641 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free