CVE-2026-35048 Piwigo RCE via PHP Code Injection into Config File in Installer

Critical 9.8 Published Updated

Unauthenticated attackers can inject arbitrary PHP code into configuration files via installer parameters, leading to remote code execution on Piwigo installations.

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

What is CVE-2026-35048?

CVE-2026-35048 is a critical code injection vulnerability in Piwigo, published on 20 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The Piwigo installer in versions 16.3.0 and earlier accepts POST parameters for database configuration and writes them directly into a PHP configuration file without proper sanitization. On PHP 8+, the `addslashes()` protection is bypassed because it checks for `get_magic_quotes_gpc()`, a function removed in PHP 8.0. This allows raw user input to be interpolated directly into PHP source code. An unauthenticated attacker can inject arbitrary PHP code through POST parameters (prefix, dbpasswd, dbhost, dbname, or dbuser), which gets written to `local/config/database.inc.php` and executed on every page load.

Weakness: CWE-20

Which versions are affected by CVE-2026-35048?

How do I fix CVE-2026-35048?

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

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-35048 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-35048 exists.

Sources

Also known as GHSA-gphq-34pv-gvf3.

Is CVE-2026-35048 in your software?

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

Check your SBOMs for free