Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Unauthenticated network RCE with full C/I/A impact; base score keeps AC:L, though the installer-must-be-reachable precondition is a real-world limiter better captured as an attack requirement in 4.0.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Articles & Coverage 1
AnalysisAI
Remote code execution in Piwigo 16.3.0 and earlier lets an unauthenticated attacker inject arbitrary PHP through the web installer, which writes unsanitized POST parameters (prefix, dbpasswd, dbhost, dbname, dbuser) into local/config/database.inc.php where they execute on every page load. The bug is a PHP 8 regression: the addslashes() guard is gated on get_magic_quotes_gpc(), removed in PHP 8.0, so escaping is silently skipped and raw input reaches PHP source. No public exploit identified at time of analysis, but the flaw is trivially weaponizable when the installer is reachable, yielding full server compromise.
Technical ContextAI
Piwigo is an open-source, self-hosted PHP photo gallery application. The vulnerable component is its first-run web installer, which collects database connection settings and persists them by string-interpolating user input into a generated PHP file (local/config/database.inc.php). Root cause maps to CWE-20 (Improper Input Validation), specifically improper neutralization of input written into a code file: the legacy defense addslashes() is only invoked behind a get_magic_quotes_gpc() check, and because that function was removed in PHP 8.0 the branch never runs, allowing quote-breaking and PHP delimiters (e.g. closing a string literal or opening <?php) to be embedded verbatim. Because the config file is include()'d on every request, injected code becomes persistent server-side execution. The CPE cpe:2.3:a:piwigo:piwigo:*:*:*:*:*:*:*:* confirms the Piwigo application itself as the affected product across versions up to and including 16.3.0.
RemediationAI
Upgrade to the fixed Piwigo release identified in advisory GHSA-gphq-34pv-gvf3 (https://github.com/Piwigo/Piwigo/security/advisories/GHSA-gphq-34pv-gvf3); the exact fixed version number is not stated in the provided data, so consult the advisory or the project releases page and install the first version above 16.3.0. As immediate compensating controls: block or restrict network access to the installer path (the install/setup endpoints) at the web server or firewall so it is not reachable from untrusted networks - trade-off is none for already-installed sites but this blocks legitimate re-runs of setup; delete or rename the installer files after successful installation, which is standard hardening with no downside for a configured instance; and after any suspected exposure, inspect local/config/database.inc.php for injected PHP and rebuild from a known-good source, since the file executes on every request. Restricting who can reach the setup flow (VPN/IP allowlist during provisioning) mitigates the setup-window exposure at the cost of slightly more complex initial deployment.
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
Same weakness CWE-20 – Improper Input Validation
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-46006