Skip to main content

Piwigo EUVDEUVD-2026-87139

| CVE-2026-42322 CRITICAL
Unrestricted Upload of File with Dangerous Type (CWE-434)
2026-09-25 GitHub_M
9.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Obtain admin/webmaster credentials
  2. Delivery
    Upload image-content file with .php extension
  3. Exploit
    Bypass MIME-only validation, file stored in logo dir
  4. Execution
    Request uploaded file URL
  5. Persist
    Web server executes payload
  6. Impact
    Arbitrary command execution and persistence

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File type validation, storage isolation
MITRE ATT&CK

2 techniques across 2 tactics: Command and Control, 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 (the fix enforces webmaster status via is_webmaster()) who can reach the admin logo-upload feature in admin/themes_standard_pages.php (the std_pgs_logo upload). Exploitation additionally depends on the deployment's web server being configured to execute the attacker-chosen final extension (e.g. PHP handler active) for files served from the web-accessible logo directory. Limiting factors: high-privilege authentication is mandatory (no unauthenticated path), the logo upload feature must be used, and the target extension must be server-executable in that environment; installations that block script execution in upload directories are protected. Affected versions are all releases prior to 16.4.0.

Impact

This is a genuine remote code execution flaw (CWE-434 unrestricted upload of file with dangerous type), not a severity-inflated issue: the fix commit confirms the root cause - admin/themes_standard_pages.php validated logo uploads by MIME type but rebuilt the stored filename from the attacker-controlled extension, letting a PHP (or other server-executable) file land in the web-accessible logo directory and run on request. The CVSS 3.1 vector (AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H = 9.1) is largely defensible: network vector, low complexity, no user interaction, and full C/I/A loss via arbitrary command execution. The single most important limiter is PR:H - exploitation requires an authenticated administrator (the fix additionally enforces is_webmaster()), which sharply reduces the realistic attacker population and makes this closer to a privileged-insider or post-compromise escalation than a mass-exploitable pre-auth bug. No EPSS score, no CISA KEV listing, and no public POC were provided, so there is no evidence of active or automated exploitation; risk is targeted rather than widespread. The S:C (scope change) is defensible because uploaded code executes in the web server context beyond the application's security scope, though S:U (yielding ~8.8) would be a reasonable alternative. Net: high technical impact, but the admin-privilege prerequisite and niche footprint keep real-world priority moderate outside of directly-exposed Piwigo installs.

Exploit ScenarioDerived

An attacker who already holds (or has phished/stolen) Piwigo administrator/webmaster credentials uploads a file whose content passes the image MIME check but whose filename carries a server-executable extension (e.g. .php); the file is stored in the web-accessible logo directory under the attacker-chosen extension. The attacker then requests that URL directly, and if the web server maps the extension to a handler, the payload executes as arbitrary code on the server. No public exploit code was identified at time of analysis, but the vulnerable code path and fix are fully documented in the vendor advisory and commits.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.5% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Sep 25, 2026

Remote code execution affects Piwigo photo-gallery installations running any release prior to 16.4.0: an authenticated administrator (CVSS PR:H) can abuse the logo upload in admin/themes_standard_pages.php to store a file whose contents pass MIME validation but whose final extension is taken verbatim from the attacker-supplied filename, so a server-executable file such as a .php script lands in the web-accessible logo directory and runs when requested. The flaw carries a CVSS v3.1 base score of 9.1 (AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H) because successful exploitation yields arbitrary command execution with full confidentiality, integrity and availability impact and a scope change, though it only works when the deployment's web server actually executes the chosen extension for files in that directory. No CISA KEV entry and no publicly available exploit code were identified at the time of analysis, and the vendor has shipped an exact fix in version 16.4.0.

RemediationAI

Vendor-released patch: upgrade to Piwigo 16.4.0, which derives the stored logo extension from an explicit MIME allow-list instead of the attacker-controlled filename and restricts the feature to webmaster accounts; apply it from https://github.com/Piwigo/Piwigo/releases/tag/16.4.0 and review the advisory https://github.com/Piwigo/Piwigo/security/advisories/GHSA-7w97-5g4p-xqvv together with the fixing commits https://github.com/Piwigo/Piwigo/commit/1e7f7262cb30e6916779f93e66d5d6579ec75a11 and https://github.com/Piwigo/Piwigo/commit/4a13ec9a8f4881ae1f23bdfd24d7b90cd0802cdc. If immediate patching is not possible, apply layered compensating controls knowing they reduce rather than eliminate risk: disable execution of scripts in the logo/upload directory by adding a web-server deny rule (for example an Apache .htaccess with php_flag engine off or a RemoveHandler directive for the relevant interpreters, or an nginx location block that returns 403 for .php/.phtml/.phar inside the upload path) - the trade-off is that any legitimate dynamic content served from that directory stops working, and misconfigured or ignored overrides (AllowOverride None) silently drop the protection; alternatively, temporarily disable the theme logo upload feature or convert the logo directory to a location only writable/readable by trusted processes; and, because the vector requires authenticated administrator access (PR:H, with the fix further restricting it to webmaster status), enforce least privilege, tightly limit who holds admin/webmaster roles, rotate credentials, and audit for unexpected files in the Piwigo upload directory. Note that no vendor patch substitutes for restricting shell/script execution in the upload path, since exploitation depends on the deployment's web server being configured to execute the attacker-chosen extension.

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

The root cause is CWE-434 (unrestricted upload of file with dangerous type) in Piwigo's admin themes/standard-pages handler, which processes the std_pgs_logo file upload. The pre-16.4.0 code validated the uploaded logo only by MIME type (mime_content_type on the temporary file, with allowed types image/png, image/jpeg, image/svg+xml, image/svg) and then rebuilt the stored filename as str2url(pathinfo filename) plus a dot plus strtolower(pathinfo extension) taken directly from the client-supplied original filename. Because the extension was never checked against the validated MIME type, an attacker could pair legitimate image bytes with a dangerous extension and have the file written into the web-accessible logo directory ($upload_dir), where the web server would hand it to the corresponding interpreter (for example the PHP handler) on request - a classic MIME-versus-extension mismatch. CPE cpe:2.3:a:piwigo:piwigo:*:*:*:*:*:*:*:* confirms a single wildcard version range, meaning every Piwigo release before 16.4.0 is in scope, and the tags PHP, File Upload and Piwigo reflect the PHP application stack and upload vector. The upstream fix commit replaces mime_content_type with finfo_file and, decisively, uses an explicit MIME-to-extension map (image/png=>png, image/jpeg=>jpg, image/svg+xml and image/svg=>svg, image/webp=>webp) so the stored extension is derived from the validated type rather than the attacker's filename, rejecting anything not in the allow-list; the same commit additionally gates the feature behind is_webmaster(), tightening the privilege requirement that the assessed vector already reflects as PR:H.

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

Authenticated admin/webmaster required (PR:H); network-reachable upload with no user interaction (AV:N/UI:N/AC:L); uploaded code runs in web-server context beyond app scope (S:C) yielding full RCE (C:H/I:H/A:H).

3.1 AV:N/AC:L/PR:H/UI:N/S:C/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
Changed
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Sep 25, 2026 - 17:04 EUVD
CVE Published
Sep 25, 2026 - 15:50 cve.org
CRITICAL 9.1

DescriptionCVE.org

Piwigo is a full featured open source photo gallery application for the web. Prior to 16.4.0, admin/themes_standard_pages.php validates uploaded logo content by MIME type but reuses the attacker-controlled extension from std_pgs_logo when constructing the stored filename. An authenticated administrator can upload image content with a server-executable final extension, causing the file to be placed in the web-accessible logo directory and executed when requested if the web server handles that extension. This can permit arbitrary command execution, data disclosure, modification, persistence, and service disruption. This vulnerability is fixed in 16.4.0.

Technical POC Analysis

CWE-434, Unrestricted Upload of File with Dangerous Type.

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

Piwigo photo-gallery installations running any release before 16.4.0 carry a critical remote code execution flaw (CVE-2026-42322) that allows an attacker already holding administrator credentials to place an executable file in a web-accessible directory and run it on the server. Because Piwigo deployments commonly host proprietary imagery, user accounts, and are co-located with other business applications, a successful compromise could expose confidential data and disrupt services beyond the gallery itself. Leadership should treat this as a priority remediation item for any team running an unpatched Piwigo instance, even though the attacker must first obtain privileged access.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% 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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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

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

Attack Technique

Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.

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