Summary
CVE-2026-62262 is an unauthenticated SQL injection vulnerability in Piwigo, the open-source web photo gallery application. The flaw resides in the public "filtered search" web service and allows an anonymous guest to extract database contents or induce time-based delays when the photo rating feature is enabled. The issue carries a CVSS v3.1 base score of 9.1 (Critical) because it requires no authentication or user interaction.
Technical details
- Root cause: When building the SQL search rule for a rating filter,
include/functions_search.inc.phpappliesintval()only to the lower bound of the rating range comparison; the upper bound is concatenated directly from the raw, attacker-supplied value, bypassing sanitization. - Trigger conditions: The Piwigo instance must have the rating feature enabled and allow guest access to web services (
ACCESS_FREEpermission on web service calls), which is a common/default configuration for public galleries. - Attack vector: An unauthenticated user sends a crafted
ratings[]value to thepwg.images.filteredSearch.createweb service method; the unvalidated value is stored in the search rule set (include/ws_functions/pwg.images.php) and later executed as part of a SQL query when the resulting search URL is opened. - Impact: Error-based and blind/time-based SQL injection enabling extraction of database contents (e.g., via
EXTRACTVALUE-style payloads) and database-dependent delays. The vulnerability affects confidentiality and integrity; availability impact is not scored.
Affected software
- Piwigo versions 17.0.0beta1 and earlier (all prior releases), when the rating feature is enabled and guest web service access is permitted.
Severity
- CVSS v3.1 Base Score: 9.1 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Mitigation and recommended actions
- Immediate: No fixed Piwigo release was publicly confirmed at the time of writing; monitor official Piwigo release channels and apply a patched version as soon as one is published.
- Workarounds:
- Disable the photo rating feature if it is not required, which removes the vulnerable code path.
- Restrict or disable guest (unauthenticated) access to Piwigo’s web services (
ACCESS_FREE) where public rating/search functionality is not needed. - Apply least-privilege database permissions to the account Piwigo uses, limiting the impact of any successful injection.
- Deploy a web application firewall rule to inspect and block malicious
ratings[]parameter values sent to thepwg.images.filteredSearch.createendpoint.

