CVE-2026-35048 Details
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.
A critical remote code execution vulnerability has been identified in the Piwigo installer, specifically in versions through 16.3.0. The issue arises because the installer accepts POST parameters for database configuration and writes them directly into a PHP configuration file without adequate sanitization. In PHP 8 and later, the `addslashes()` function, which could have provided some level of protection, is rendered ineffective as it relies on `get_magic_quotes_gpc()`, a function that was removed in PHP 8.0. This flaw allows raw user input to be directly interpolated into PHP code. An unauthenticated attacker can exploit this by injecting arbitrary PHP code through several POST parameters, including prefix, dbpasswd, dbhost, dbname, and dbuser. The injected code is written to `local/config/database.inc.php`, where it is executed with web server privileges on every page load.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 20, 2026CISA-ADP
Assessed Jul 20, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/Piwigo/Piwigo/security/advisories/GHSA-gphq-34pv-gvf3 | CISA-ADP | AdvisoryExploitTechnical AnalysisVendor |
| https://github.com/Piwigo/Piwigo/security/advisories/GHSA-gphq-34pv-gvf3 | [email protected] | AdvisoryExploitTechnical AnalysisVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-20 | Improper Input Validation | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Piwigo | <= 16.3.0 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 20, 2026 | CVE Modified | CISA-ADP |
| Jul 20, 2026 | New CVE Received | [email protected] |
Volerion