Junglewise Threat Intelligence

CVE-2026-35048: Piwigo PHP code injection in installer

CVE-2026-35048 · Severity: critical · CVSS 9.8 · Published 2026-07-20

Technologies: Piwigo. Vendors: Piwigo.

Executive brief

Piwigo is a popular open-source photo gallery software. A vulnerability in its installation process allows an unauthenticated attacker to take full control of the web server by injecting malicious code into the database configuration file. This could lead to a total compromise of the website, including the theft of customer data, deletion of files, or the installation of persistent backdoors.

Technical details

A PHP code injection vulnerability exists in Piwigo's `install.php` component. The installer accepts POST parameters (such as `prefix`, `dbpasswd`, or `dbhost`) and writes them directly into `local/config/database.inc.php` without adequate sanitization. On PHP 8.0 and later, the application's reliance on `addslashes()` is bypassed because the internal logic incorrectly checks for `get_magic_quotes_gpc()`, a function removed in PHP 8.0. An unauthenticated attacker can provide a crafted payload that escapes the configuration string and executes arbitrary system commands via `system()` or similar functions. This code is then executed every time a page is loaded on the site. No patch was available at the time of the advisory.

Affected products

  • Piwigo Piwigo <= 16.3.0

Timeline

  • 2026-07-18: advisory: GitHub Security Advisory published
  • 2026-07-20: disclosed: NVD publication date

References

Related threats