CVE-2026-35048
published critical CVSS 3.1 · 9.8Piwigo RCE via PHP Code Injection into Config File in Installer
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Piwigo | — | Piwigo<= 16.3.0 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 9.8 / 10
- Severity
- critical
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Piwigo | Piwigo | <= 16.3.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-20 CWE-20: Improper Input Validation
References
1Provider assertions
2GitHub_M · cna
Piwigo RCE via PHP Code Injection into Config File in Installer
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- f4bed4ba6719a4f6e7e77f5101b6074859369493e2273bb177099e2c74818b56
- Ingested
- 23 Sep 2026, 09:11:31 UTC
- Source record
- Official CVE record