Skip to main content

Piwigo CVE-2026-42324

| EUVDEUVD-2026-87138 HIGH
SQL Injection (CWE-89)
2026-09-25 GitHub_M
7.2
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Obtain administrator session on Piwigo
  2. Delivery
    Submit crafted image_order[] to element_set_ranks.php
  3. Exploit
    Malicious expression stored, bypassing sort whitelist
  4. Execution
    Trigger album/Batch Manager query concatenating it into ORDER BY
  5. Impact
    SQL executes, exfiltrating or corrupting database data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires an authenticated Piwigo administrator account with access to the Batch Manager / element ranking feature (admin/element_set_ranks.php), consistent with PR:H. A concrete precondition stated in the advisory: at least one album must contain at least one photo, so that a later album or Batch Manager query (batch_manager_global.php, batch_manager_unit.php, section_init.inc.php, or ws_functions/pwg.categories.php) concatenates the stored image_order expression into an ORDER BY clause and triggers execution. The payload is stored and executes on a subsequent query rather than immediately. Exploitation is limited to Piwigo versions prior to 16.4.0 and is gated by administrator privileges, which materially bounds real-world risk.

Impact

The CVSS 3.1 vector (AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H = 7.2 High) is internally consistent with the description: a network-reachable admin panel endpoint, low attack complexity, and no user interaction, but requiring high privileges (PR:H). The single most important limiting signal is PR:H - exploitation requires an authenticated administrator, who in Piwigo already legitimately controls gallery configuration, so this is primarily a privilege-boundary / defense-in-depth issue (config admin → arbitrary SQL) rather than a path to initial compromise. The full C:H/I:H/A:H triad is defensible because a stored SQL injection into ORDER BY clauses lets the attacker disclose, modify, or disrupt arbitrary database contents. No EPSS score, no CISA KEV listing, and no public exploit are present in the input, so there is no evidence of active or opportunistic exploitation - this reads as a real but low-urgency issue: genuinely exploitable, but gated behind admin access and confined to a niche self-hosted application. No signals conflict; the main caveat is that the practical impact of an already-admin attacker gaining SQL execution is bounded in single-tenant deployments but larger where the DB is shared or holds other applications' data.

Exploit ScenarioDerived

An authenticated Piwigo administrator (or an attacker who has hijacked an admin session, e.g. via stolen credentials or CSRF) submits a crafted image_order[] value through admin/element_set_ranks.php, which is stored without the sort-field whitelist. When the gallery is next rendered or a Batch Manager query runs, the malicious expression is concatenated into an ORDER BY clause and executed, letting the attacker read, alter, or destroy database data. No public proof-of-concept is identified in the provided data.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.9% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Sep 25, 2026

Stored SQL injection in Piwigo photo gallery versions prior to 16.4.0 lets an authenticated administrator store a crafted image_order[] value that is later concatenated into ORDER BY clauses, enabling disclosure, modification, or disruption of database data. Exploitation requires a high-privileged admin account (PR:H per the assessed CVSS 3.1 vector, 7.2 High) and the precondition that at least one album contains at least one photo, so the injected expression is executed on a subsequent album or Batch Manager query rather than immediately. No public exploit code or confirmed active exploitation was identified at time of analysis, and the vendor has released a fixed version, 16.4.0.

RemediationAI

Upgrade to Piwigo 16.4.0 or later - this is the vendor-released fix, shipping the commit that enforces the sort-field whitelist on image_order[] before storage (e.g., only 'file ASC', 'name DESC', 'rank ASC' and similar allow-listed values are accepted). Confirm the deployment matches the 16.4.0 release tag (https://github.com/Piwigo/Piwigo/releases/tag/16.4.0) and consult the vendor advisory (https://github.com/Piwigo/Piwigo/security/advisories/GHSA-jhp4-7f82-8f6q) plus the fix diffs at https://github.com/Piwigo/Piwigo/commit/ba1f803f8cefd3602ccb9c6f0155cd529510288a and https://github.com/Piwigo/Piwigo/commit/ef9e65386d76f9c85f1e23a45dd7af14a5b73a47. If an immediate upgrade is not possible, the exploit is gated by administrator privileges (PR:H), so the most effective compensating control is to restrict admin accounts to fully trusted staff, enforce least privilege, and suspend any admin account that does not require Batch Manager or element-ranking access; the trade-off is reduced operational flexibility for gallery curation. Additional hardening includes placing the Piwigo admin interface behind access controls (VPN, IP allow-list, or HTTP auth) so the vulnerable endpoint is not network-reachable, and auditing existing albums for anomalous image_order values stored before remediation - noting that the injection fires only when at least one album contains at least one photo and a Batch Manager or album query subsequently runs, so stored payloads may remain latent until the fix is applied. Rotate database credentials if compromise is suspected, since the weakness permits disclosure and modification of database data (C/I/A all High).

Affected VersionsENISA

piwigo < 16.4.0

Affected Packages

euvd piwigo fix: 16.4.0

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

This is a CWE-89 SQL injection rooted in missing input validation on an administrative sort-field parameter. Piwigo's admin/element_set_ranks.php accepts image_order[] values from the admin UI and persists them as an album's image order expression. The file already contained a defined sort-field whitelist array ($sort_fields), but the write path did not enforce it, so arbitrary strings could be stored. The two upstream commits (ba1f803f8cefd3602ccb9c6f0155cd529510288a and ef9e65386d76f9c85f1e23a45dd7af14a5b73a47) move the $sort_fields array to the top of the file and add an in_array(..., array_keys($sort_fields)) check on $_POST['image_order'][$i], rejecting anything outside the known-safe list such as 'file ASC', 'name DESC', 'date_creation DESC', 'rating_score ASC', 'hit DESC', 'id ASC', and 'rank ASC'. The stored expression is then interpolated 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, which is where the injection actually fires. Because concatenation into ORDER BY occurs without parameterization or allow-listing at read time, a stored payload survives until one of those query paths runs, making this a second-order (stored) injection rather than an immediate one. The affected component set is captured by the CPE cpe:2.3:a:piwigo:piwigo:*:*:*:*:*:*:*:* (all versions before the fix), and the PHP tag aligns with Piwigo's PHP web application stack.

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 7.2 HIGH
AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.2 HIGH

Network-reachable admin endpoint (AV:N/AC:L) requires administrator privileges (PR:H) and no interaction; stored SQL injection yields full database read/write/disruption (C:H/I:H/A:H).

3.1 AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:H/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
High
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Sep 25, 2026 - 17:04 EUVD
CVE Published
Sep 25, 2026 - 15:48 cve.org
HIGH 7.2

DescriptionCVE.org

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.

Technical POC Analysis

CWE-89, second-order (stored) SQL injection.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A stored SQL injection flaw in the Piwigo photo gallery platform (versions prior to 16.4.0) allows someone holding a high-privileged administrator account to manipulate database queries that run during routine gallery and Batch Manager operations. Because the affected account type typically belongs to trusted staff or webmasters, the practical risk is insider misuse or abuse of compromised or over-provisioned admin credentials rather than mass external attack. Leadership should care because successful abuse could expose, alter, or disrupt the data behind a public-facing gallery, with potential integrity, availability, and reputational consequences for the organization's digital presence.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.9%
Top 41% exploitable
Prevalence
Low
niche self-hosted open-source photo gallery, limited enterprise footprint
Data Quality
5 sources
Confidence: Medium

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 HIGH
CISA KEV No
Public POC No
EPSS 0.9%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
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
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

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