Skip to main content

Piwigo CVE-2026-35048

| EUVDEUVD-2026-46006 CRITICAL
Improper Input Validation (CWE-20)
2026-07-20 GitHub_M
9.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Locate reachable Piwigo installer
  2. Delivery
    Send crafted POST with PHP in dbname/dbhost
  3. Exploit
    Bypass skipped addslashes() on PHP 8
  4. Execution
    Payload written to database.inc.php
  5. Persist
    Code executes on next page load
  6. Impact
    RCE 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

piwigo ≤ 16.3.0

Affected Packages

euvd piwigo no fix

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

Vendor (GitHub_M) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 9.8 CRITICAL

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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.

Executive ViewAI

Why It Matters

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.

Business Impact: Severe
Compensating Controls

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

EPSS Score
0.3%
Top 76% exploitable
Prevalence
Medium
popular open-source self-hosted photo gallery, moderate but not enterprise-wide footprint
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Piwigo

View all
CVE-2013-1469 MEDIUM POC
4.0 Mar 13

Directory traversal vulnerability in install.php in Piwigo before 2.4.7 allows remote attackers to read and delete arbit

CVE-2013-1468 HIGH POC
7.6 Mar 14

Cross-site request forgery (CSRF) vulnerability in the LocalFiles Editor plugin in Piwigo before 2.4.7 allows remote att

CVE-2017-10682 CRITICAL POC
9.8 Jun 29

SQL injection vulnerability in the administrative backend in Piwigo through 2.9.1 allows remote users to execute arbitra

CVE-2023-33362 CRITICAL POC
9.8 May 23

Piwigo 13.6.0 is vulnerable to SQL Injection via in the "profile" function. Rated critical severity (CVSS 9.8), this vul

CVE-2023-33361 CRITICAL POC
9.8 May 23

Piwigo 13.6.0 is vulnerable to SQL Injection via /admin/permalinks.php. Rated critical severity (CVSS 9.8), this vulnera

CVE-2021-32615 CRITICAL POC
9.8 May 13

Piwigo 11.4.0 allows admin/user_list_backend.php order[0][dir] SQL Injection. Rated critical severity (CVSS 9.8), this v

CVE-2019-13364 CRITICAL POC
9.6 Sep 13

admin.php?page=account_billing in Piwigo 2.9.5 has XSS via the vat&#95;number, billing&#95;name, company, or billing&#95

CVE-2019-13363 CRITICAL POC
9.6 Sep 13

admin.php?page=notification_by_mail in Piwigo 2.9.5 has XSS via the nbm&#95;send&#95;html&#95;mail, nbm&#95;send&#95;mai

CVE-2017-10681 HIGH POC
8.8 Jun 29

Cross-site request forgery (CSRF) vulnerability in Piwigo through 2.9.1 allows remote attackers to hijack the authentica

CVE-2017-10680 HIGH POC
8.8 Jun 29

Cross-site request forgery (CSRF) vulnerability in Piwigo through 2.9.1 allows remote attackers to hijack the authentica

CVE-2017-10678 HIGH POC
8.8 Jun 29

Cross-site request forgery (CSRF) vulnerability in Piwigo through 2.9.1 allows remote attackers to hijack the authentica

CVE-2017-17774 HIGH POC
8.8 Dec 20

admin/configuration.php in Piwigo 2.9.2 has CSRF. Rated high severity (CVSS 8.8), this vulnerability is remotely exploit

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy