Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain admin/webmaster credentials
-
DeliveryUpload image-content file with .php extension
-
ExploitBypass MIME-only validation, file stored in logo dir
-
ExecutionRequest uploaded file URL
-
PersistWeb server executes payload
-
ImpactArbitrary 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
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).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.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.
Articles & Coverage 1
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
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.
Directory traversal vulnerability in install.php in Piwigo before 2.4.7 allows remote attackers to read and delete arbit
Cross-site request forgery (CSRF) vulnerability in the LocalFiles Editor plugin in Piwigo before 2.4.7 allows remote att
SQL injection vulnerability in the administrative backend in Piwigo through 2.9.1 allows remote users to execute arbitra
Piwigo 13.6.0 is vulnerable to SQL Injection via in the "profile" function. Rated critical severity (CVSS 9.8), this vul
Piwigo 13.6.0 is vulnerable to SQL Injection via /admin/permalinks.php. Rated critical severity (CVSS 9.8), this vulnera
Piwigo 11.4.0 allows admin/user_list_backend.php order[0][dir] SQL Injection. Rated critical severity (CVSS 9.8), this v
admin.php?page=account_billing in Piwigo 2.9.5 has XSS via the vat_number, billing_name, company, or billing_
admin.php?page=notification_by_mail in Piwigo 2.9.5 has XSS via the nbm_send_html_mail, nbm_send_mai
Cross-site request forgery (CSRF) vulnerability in Piwigo through 2.9.1 allows remote attackers to hijack the authentica
Cross-site request forgery (CSRF) vulnerability in Piwigo through 2.9.1 allows remote attackers to hijack the authentica
Cross-site request forgery (CSRF) vulnerability in Piwigo through 2.9.1 allows remote attackers to hijack the authentica
admin/configuration.php in Piwigo 2.9.2 has CSRF. Rated high severity (CVSS 8.8), this vulnerability is remotely exploit
EUVD-2026-87139
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB