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.
Published: 2026-07-20
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability allows an attacker to inject arbitrary PHP code into the Piwigo database configuration file during installation. Because the installer writes POST parameters directly to the PHP source file without sanitization, the injected code is executed on every page load, providing full control over the server. The weakness is a classic input validation flaw, identified as CWE‑20, and the impact is complete compromise of confidentiality, integrity, and availability.

Affected Systems

Inventories of Piwigo installations running version 16.3.0 or earlier are affected. The issue resides in the installer component of the Piwigo product, and any deployment that has not upgraded past the 16.3.0 release timeline remains vulnerable.

Risk and Exploitability

The CVSS base score of 9.8 indicates critical severity. The EPSS score of < 1% suggests a very low, but non‑zero, probability that this vulnerability is currently being exploited in the wild. Based on the description, it is inferred that the attacker can reach the installer via unauthenticated HTTP POST requests, giving them the ability to inject arbitrary PHP code that executes on every page load. The catalog status indicates it is not listed in CISA’s KEV, yet its high severity warrants immediate attention.

Generated by OpenCVE AI on July 30, 2026 at 19:06 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to the latest Piwigo release where the installer sanitizes input.
  • Remove or restrict web access to the installer directory so that unauthenticated POST requests cannot reach it.
  • Inspect or restore local/config/database.inc.php to ensure no injected PHP code remains, and set file permissions to prevent web‑server write access.

Generated by OpenCVE AI on July 30, 2026 at 19:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 20 Jul 2026 23:30:00 +0000

Type Values Removed Values Added
First Time appeared Piwigo
Piwigo piwigo
Vendors & Products Piwigo
Piwigo piwigo

Mon, 20 Jul 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 20 Jul 2026 16:45:00 +0000

Type Values Removed Values Added
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.
Title Piwigo RCE via PHP Code Injection into Config File in Installer
Weaknesses CWE-20
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-20T17:11:17.973Z

Reserved: 2026-03-31T21:06:06.429Z

Link: CVE-2026-35048

cve-icon Vulnrichment

Updated: 2026-07-20T17:10:55.361Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T19:15:04Z

Weaknesses
  • CWE-20

    Improper Input Validation