Piwigo RCE via PHP Code Injection into Config File in Installer
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- No fix listed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
No fixed version listed by the sources yet.
Timeline
- 2026-10-02 Threatist record created from CVE-2026-35048
More Piwigo vulnerabilities
- TI-2023-16500 Piwigo 13.6.0 is vulnerable to SQL Injection via in the "profile" function. CVSS 3.1CRITICAL 9.8
- TI-2026-44470 Piwigo: Unauthenticated SQL injection in `pwg.images.filteredSearch.create` CVSS 3.1CRITICAL 9.1
- TI-2023-16499 Piwigo 13.6.0 is vulnerable to SQL Injection via /admin/permalinks.php. CVSS 3.1CRITICAL 9.8
- TI-2023-23899 Piwigo Reflected XSS vulnerability CVSS 3.1CRITICAL 9.3
- TI-2026-30629 Piwigo: Authenticated RCE via File Upload in Logo Upload Feature CVSS 3.1CRITICAL 9.1
- TI-2025-38673 Piwigo is vulnerable to one-click account takeover by modifying the password-reset link CVSS 3.1HIGH 8.8
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences