# CVE-2026-42322: Piwigo arbitrary code execution via logo upload extension validation bypass

Source: https://junglewise.ai/threats/cve-2026-42322-piwigo-is-a-full-featured-open-source-photo-gallery-application  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-25. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-42322 · Severity: critical · CVSS 9.1 · Published 2026-09-25

Piwigo is an open source photo gallery application. Prior to version 16.4.0, an authenticated administrator can upload a malicious file with an executable extension (such as .php) as a logo. The application validates file content by MIME type but reuses the attacker-supplied filename extension, allowing the executable file to be stored in a web-accessible directory and executed by the server, leading to complete compromise of the gallery.

Technologies: [Piwigo](https://junglewise.ai/threats/technologies/piwigo). Vendors: [Piwigo](https://junglewise.ai/threats/vendors/piwigo).

## Quick answers

**Is CVE-2026-42322 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-42322 being exploited in the wild.

**How severe is CVE-2026-42322?** Critical severity, with a CVSS score of 9.1, published 25 September 2026.

**Which products and versions are affected?** Piwigo before 16.4.0.

**Is there a fix for CVE-2026-42322?** A patch was published on 2026: Fixed in version 16.4.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-42322 attacked?** It is attacked over the network, in a web application.

**Am I affected by CVE-2026-42322?** Check whether you run Piwigo at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability exists in admin/themes_standard_pages.php where logo upload validation checks MIME type but fails to sanitize or restrict the file extension, instead reusing the attacker-controlled extension from the std_pgs_logo parameter when storing the file. An authenticated administrator can craft a request with image MIME type but a server-executable extension (e.g., .php), which is then written to a web-accessible logo directory and executed upon access. The issue is resolved in version 16.4.0 with more robust file type checking.

## Affected products

- Piwigo Piwigo before 16.4.0

## Timeline

- 2026-09-25: disclosed
- 2026: patched: Fixed in version 16.4.0

## References

- [https://github.com/Piwigo/Piwigo/commit/1e7f7262cb30e6916779f93e66d5d6579ec75a11](https://github.com/Piwigo/Piwigo/commit/1e7f7262cb30e6916779f93e66d5d6579ec75a11)
- [https://github.com/Piwigo/Piwigo/commit/4a13ec9a8f4881ae1f23bdfd24d7b90cd0802cdc](https://github.com/Piwigo/Piwigo/commit/4a13ec9a8f4881ae1f23bdfd24d7b90cd0802cdc)

## Related threats

- [Piwigo SQL injection in image rating search](https://junglewise.ai/threats/cve-2026-62262-piwigo-is-a-full-featured-open-source-photo-gallery-application)
- [Piwigo SQL injection in upgrade authentication](https://junglewise.ai/threats/cve-2026-44642-piwigo-is-a-full-featured-open-source-photo-gallery-application)
- [Piwigo SQL injection via unvalidated image_order parameter](https://junglewise.ai/threats/cve-2026-42324-piwigo-is-a-full-featured-open-source-photo-gallery-application)
- [Piwigo SQL injection in batch manager filter](https://junglewise.ai/threats/cve-2026-42323-piwigo-is-a-full-featured-open-source-photo-gallery-application)
- [Piwigo arbitrary file read and RCE in image upload handling](https://junglewise.ai/threats/cve-2026-85750-piwigo-before-v16-4-0-is-vulnerable-to-arbitrary-file-read-and)
