Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessLocate reachable Piwigo installer
-
DeliverySend crafted POST with PHP in dbname/dbhost
-
ExploitBypass skipped addslashes() on PHP 8
-
ExecutionPayload written to database.inc.php
-
PersistCode executes on next page load
-
ImpactRCE as web server user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
|
| Exploitation Conditions | Exploitation requires that the Piwigo installer/setup flow be network-reachable and that the target run PHP 8.0 or newer (the missing get_magic_quotes_gpc() is what disables escaping) - this is the exact precondition, not a generic one. The attacker needs no authentication and no user interaction, and injects via the installer's database POST parameters (prefix, dbpasswd, dbhost, dbname, or dbuser). The dominant limiting factor is deployment state: the installer must be accessible in an unconfigured/re-runnable state, so hardened instances that removed or firewalled the installer after setup are not exploitable, and configured production galleries are generally out of reach. Applies to Piwigo 16.3.0 and earlier. |
| Impact | The NVD CVSS 3.1 vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (9.8) frames this as network-reachable, unauthenticated, low-complexity full-impact RCE, which is accurate WHEN the installer is exposed. The critical caveat is a real-world limiter not reflected in the base score: exploitation requires Piwigo to be in an unconfigured/installer-accessible state (fresh install, or an installer left reachable), so mass automated exploitation of already-configured production galleries is unlikely - this is closer to a setup-window / exposed-installer risk than a persistent internet-wide RCE. No EPSS score was provided, the CVE is not in CISA KEV (no confirmed active exploitation), and no POC was supplied. Signals are therefore consistent but not alarming: high technical impact and low attack skill, tempered by a deployment-state precondition. Prioritize highly for any host where the installer may be reachable; deprioritize modestly for long-running, fully-configured instances with the installer removed. |
| Exploit ScenarioDerived | An attacker discovers a freshly deployed or partially provisioned Piwigo instance whose installer is still reachable, and submits a crafted POST to the database-configuration step with a PHP payload embedded in a field such as dbname or dbhost. Because addslashes() is skipped on PHP 8, the payload is written verbatim into database.inc.php and executes on the next page load, giving the attacker code execution as the web server user. No public POC is currently identified, but the injection is straightforward to reproduce given the described mechanism. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 20, 2026
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.
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.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
Know when Piwigo gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
DescriptionCVE.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
Executive ViewAI
Piwigo versions 16.3.0 and earlier contain a critical remote code execution vulnerability in the web installer that allows unauthenticated attackers to execute arbitrary PHP code and achieve full server compromise. The flaw stems from a PHP 8 regression where input sanitization was inadvertently disabled, leaving database configuration parameters open to code injection. Organizations running Piwigo face immediate risk if their installer remains accessible, with no vendor patch currently available.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable or remove the web installer if the Piwigo instance is fully configured; restrict network access via firewall or reverse proxy if the installer must remain available; (2) Monitor application logs and system processes for suspicious PHP execution in the /install directory; (3) Maintain offline backups to enable rapid recovery if compromise occurs; (4) Isolate affected systems from critical infrastructure and databases until patched. Patch availability is critical-contact Piwigo security team directly for release timeline.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Directory traversal vulnerability in install.php in Piwigo before 2.4.7 allows remote attackers to read and delete arbit
Cross-site request forgery (CSRF) vulnerability in the LocalFiles Editor plugin in Piwigo before 2.4.7 allows remote att
SQL injection vulnerability in the administrative backend in Piwigo through 2.9.1 allows remote users to execute arbitra
Piwigo 13.6.0 is vulnerable to SQL Injection via in the "profile" function. Rated critical severity (CVSS 9.8), this vul
Piwigo 13.6.0 is vulnerable to SQL Injection via /admin/permalinks.php. Rated critical severity (CVSS 9.8), this vulnera
Piwigo 11.4.0 allows admin/user_list_backend.php order[0][dir] SQL Injection. Rated critical severity (CVSS 9.8), this v
admin.php?page=account_billing in Piwigo 2.9.5 has XSS via the vat_number, billing_name, company, or billing_
admin.php?page=notification_by_mail in Piwigo 2.9.5 has XSS via the nbm_send_html_mail, nbm_send_mai
Cross-site request forgery (CSRF) vulnerability in Piwigo through 2.9.1 allows remote attackers to hijack the authentica
Cross-site request forgery (CSRF) vulnerability in Piwigo through 2.9.1 allows remote attackers to hijack the authentica
Cross-site request forgery (CSRF) vulnerability in Piwigo through 2.9.1 allows remote attackers to hijack the authentica
admin/configuration.php in Piwigo 2.9.2 has CSRF. Rated high severity (CVSS 8.8), this vulnerability is remotely exploit
EUVD-2026-46006
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB