CVE-2026-35048
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedThe 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThis is a PHP code injection vulnerability in the Piwigo installer (versions 16.3.0 and earlier) where database configuration POST parameters are written directly to `local/config/database.inc.php` without proper sanitization. The protection using `addslashes()` checks for `get_magic_quotes_gpc()`, a function removed in PHP 8.0, effectively bypassing the protection on modern PHP versions and allowing unauthenticated attackers to inject arbitrary PHP code via POST parameters (prefix, dbpasswd, dbhost, dbname, or dbuser).
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check installed Piwigo versionLocate the version file (typically include/constants.inc.php or a VERSION file in the Piwigo root directory) and read the version number.Affected if The installed version is 16.3.0 or earlier.
-
Check PHP versionRun `php -v` from command line or use `phpinfo()` to determine the PHP version.Affected if PHP version is 8.0 or higher.
-
Verify installer accessibilityCheck if the Piwigo installer script exists and is accessible via HTTP (typically at /install.php or /admin/install.php). Attempt to access it in a non-production manner or check web server logs for access attempts.Affected if The installer file exists and is accessible (not removed or restricted).
-
Inspect database config file for injected codeRead the file local/config/database.inc.php (or the equivalent config path) and examine the values for variables like $conf['db_host'], $conf['db_user'], $conf['db_password'], $conf['db_name'], and $conf['table_prefix']. Look for unexpected PHP code patterns such as <?php, eval(), system(), or other suspicious syntax.Affected if The config file contains any PHP code injection patterns in the configuration values.
-
Check for recent unauthorized modifications to configReview file modification timestamps on local/config/database.inc.php and compare with expected deployment times. Check web server access logs for POST requests to the installer around the time of any unexpected modifications.Affected if The config file was modified at an unexpected time or shows signs of unauthorized write operations.
A user is affected if running Piwigo version 16.3.0 or earlier on PHP 8.0+ with the installer still accessible, or if local/config/database.inc.php contains suspicious PHP code patterns.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade Piwigo to a version beyond 16.3.0 which should contain proper input sanitization, and delete or disable the installer after initial setup. If patching is required, implement proper escaping/sanitization for all database configuration parameters before writing to the PHP config file.
Piwigo version newer than 16.3.0 (check GitHub releases for the specific fixed release)
- 1. Download the latest version of Piwigo from the official repository or website.
- 2. Before upgrading, back up your existing Piwigo installation and database.
- 3. Ensure your PHP version is compatible with the new Piwigo version (note: PHP 8+ is required for the fix to work properly).
- 4. Upload and extract the new Piwigo files to your web server, replacing the old installation.
- 5. Run the upgrade process by accessing your Piwigo site - the new version will include the fixed installer with proper input sanitization.
- 6. After upgrade, verify that local/config/database.inc.php exists and has properly escaped values.
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation4.0 h
- Testing3.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,088.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-35048 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-35048 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data