CVE-2026-44642

Piwigo: SQL injection in upgrade authentication allows unauthenticated upgrade authorization bypass (PHP 8+)

Published Sep 25, 2026 CVSS 3.1 · 8.1 High EPSS 1.3% KEV · Not listed
Description
Piwigo is a full featured open source photo gallery application for the web. Prior to 16.4.0, check_upgrade_access_rights() in admin/include/functions_upgrade.php conditionally escapes the submitted username only when the removed get_magic_quotes_gpc function exists, so PHP 8 and later concatenate an unauthenticated username directly into the upgrade authentication SQL query. When database upgrades are pending, a crafted query result can satisfy the status and password checks, set PHPWG_IN_UPGRADE, and authorize upgrade execution without valid administrator credentials. This can cause unauthorized database integrity changes and service disruption. This vulnerability is fixed in 16.4.0.

Analysis

AI-generated

Technical impact

This vulnerability is a SQL injection in Piwigo's upgrade authentication that lets an unauthenticated attacker supply a crafted username. Because the code only escapes the username when PHP's old get_magic_quotes_gpc function exists, PHP 8 and newer concatenate the raw string into the SQL query. When an upgrade is pending, a crafted query result can satisfy the authentication checks, set the upgrade flag, and allow the attacker to execute an upgrade without valid administrator credentials. The result is unauthorized modifications to the database and possible service disruption.

Affected Systems

Piwigo is a popular web photo gallery. All versions released before 16.4.0 are vulnerable. The problem is in admin/include/functions_upgrade.php inside the check_upgrade_access_rights function. Users running older installations of Piwigo, especially those that have not yet applied the 16.4.0 release, are at risk.

Risk and Exploitability

The CVSS score of 8.1 indicates a high severity issue. The EPSS score is now 1%, indicating a very low but non-zero exploitation probability, but the lack of an KEV listing does not reduce the risk. The attack vector is derived from the description: any web visitor can submit a crafted username during an upgrade operation, so the vulnerability can be exploited without authentication and over the public URL of the upgrade page. Because it allows privilege escalation, the potential damage is substantial, particularly in environments where backups are infrequent or where the gallery holds valuable data.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Piwigo to version 16.4.0 or later.
  • While awaiting the upgrade, temporarily disable the upgrade functionality or restrict access to the upgrade page.
  • Ensure that no database upgrades are pending after the patch has been applied, to prevent a residual bypass.

Generated by OpenCVE AI on September 26, 2026 at 14:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Piwigo
Piwigo piwigo
Vendors & Products Piwigo
Piwigo piwigo
Type Values Removed Values Added
Description Piwigo is a full featured open source photo gallery application for the web. Prior to 16.4.0, check_upgrade_access_rights() in admin/include/functions_upgrade.php conditionally escapes the submitted username only when the removed get_magic_quotes_gpc function exists, so PHP 8 and later concatenate an unauthenticated username directly into the upgrade authentication SQL query. When database upgrades are pending, a crafted query result can satisfy the status and password checks, set PHPWG_IN_UPGRADE, and authorize upgrade execution without valid administrator credentials. This can cause unauthorized database integrity changes and service disruption. This vulnerability is fixed in 16.4.0.
Title Piwigo: SQL injection in upgrade authentication allows unauthenticated upgrade authorization bypass (PHP 8+)
Weaknesses CWE-89
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 25, 2026, 4:41 PM
Reserved
May 7, 2026, 3:30 PM
Status
Deferred
Published
Sep 25, 2026, 4:17 PM
Modified
Sep 25, 2026, 5:17 PM