Description
Piwigo is a full featured open source photo gallery application for the web. Prior to 16.4.0, admin/element_set_ranks.php stores administrator-controlled image_order[] values without enforcing the existing sort-field whitelist. The stored album image_order expression is later concatenated into ORDER BY clauses by admin/batch_manager_global.php, admin/batch_manager_unit.php, include/section_init.inc.php, and include/ws_functions/pwg.categories.php. When at least one album contains at least one photo, an authenticated administrator can store a crafted expression and trigger it in a later album or Batch Manager query to disclose, modify, or disrupt database data. This issue is fixed in version 16.4.0.
Published: 2026-09-25
Score: 7.2 High
EPSS: < 1% Very Low
KEV: No
Impact: Database Compromise
Action: Immediate Patch
AI Analysis

Impact

Piwigo, a web photo gallery, contains a second‑order SQL injection that allows an authenticated administrator to inject a malicious ORDER BY clause into the database query. The flaw arises when administrator‑controlled image_order values are stored without checking against the sort‑field whitelist; later, these expressions are concatenated into SQL ORDER BY clauses in several admin scripts. An attacker can craft an expression that discloses, modifies, or disrupts database data. The vulnerability leads to loss of confidentiality, integrity, or availability of data stored in the gallery.

Affected Systems

The issue affects Piwigo versions prior to 16.4.0. Administrators who have access to the admin interface of any Piwigo installation before that release are impacted.

Risk and Exploitability

The vulnerability receives a CVSS score of 7.2 and is not listed in CISA's KEV catalog. The EPSS score is not available, so the likelihood of exploitation in the wild cannot be quantified from the data. Attackers must be authenticated administrators; the exploitation path requires the attacker to store a crafted image_order expression via the element_set_ranks script and later trigger it in one of the batch manager or category functions. Once triggered, the attacker can read, alter, or delete database content. The attack surface is limited to privileged administrative accounts, but the impact on data can be significant.

Generated by OpenCVE AI on September 25, 2026 at 18:47 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Piwigo to version 16.4.0 or later, which removes the vulnerability
  • If an upgrade cannot be performed immediately, restrict administrator access to the affected scripts or disable batch manager features until the fix is applied
  • Verify that no malicious ORDER BY expressions remain in existing albums and monitor database logs for unusual query activity

Generated by OpenCVE AI on September 25, 2026 at 18:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 26 Sep 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Sat, 26 Sep 2026 12:00:00 +0000

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

Fri, 25 Sep 2026 16:00:00 +0000

Type Values Removed Values Added
Description Piwigo is a full featured open source photo gallery application for the web. Prior to 16.4.0, admin/element_set_ranks.php stores administrator-controlled image_order[] values without enforcing the existing sort-field whitelist. The stored album image_order expression is later concatenated into ORDER BY clauses by admin/batch_manager_global.php, admin/batch_manager_unit.php, include/section_init.inc.php, and include/ws_functions/pwg.categories.php. When at least one album contains at least one photo, an authenticated administrator can store a crafted expression and trigger it in a later album or Batch Manager query to disclose, modify, or disrupt database data. This issue is fixed in version 16.4.0.
Title Piwigo: Second-Order SQL Injection
Weaknesses CWE-89
References
Metrics cvssV3_1

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


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-25T16:15:01.123Z

Reserved: 2026-04-26T12:37:18.170Z

Link: CVE-2026-42324

cve-icon Vulnrichment

Updated: 2026-09-25T16:14:44.195Z

cve-icon NVD

Status : Deferred

Published: 2026-09-25T16:17:25.793

Modified: 2026-09-25T17:17:08.467

Link: CVE-2026-42324

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-26T11:45:09Z

Weaknesses
  • CWE-89

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