Summary
CVE-2026-104051 is an information disclosure vulnerability (CWE-522: Insufficiently Protected Credentials) in PictShare, a self-hosted image/file-sharing application. The API::info() endpoint returns the complete raw metadata object for an uploaded file — including the secret delete_code and uploader details — to any unauthenticated caller who knows the file’s hash, allowing that caller to subsequently delete the file. The issue is rated HIGH severity (CVSS v4.0 base score 8.8).
Technical details
- Root cause:
API::info()returned the full contents of the file’smeta.jsonmetadata object without a field whitelist, instead of only non-sensitive fields. - The returned object included
delete_code(the secret token required to delete a file), along with the uploader’s IP address, User-Agent, remote port, and the file’s SHA-1 hash. - Trigger condition: an attacker only needs the publicly visible file hash (e.g., obtained from a shared PictShare link) and calls the
infoAPI endpoint for that hash — no authentication or special privileges are required. - Attack vector: network, via unauthenticated HTTP requests to the PictShare API.
- Impact: the disclosed
delete_codecan be replayed against the delete API to permanently delete arbitrary files, resulting in loss of content integrity/availability; the exposed uploader IP, User-Agent, remote port, and hash also constitute a privacy/information disclosure impact. - Related hardening in the same fix: the delete-code comparison previously used a loose
==check and treated an unsetMASTER_DELETE_CODE(empty string by Docker default) as a valid match, which could allow deletion of files with no delete code set; and delete codes were generated withrand()rather than a cryptographically secure generator.
Affected software
- PictShare (HaschekSolutions) versions 2.0.0 up to, but not including, 3.7.1
Severity
- CVSS v3.1 Base Score: 8.2 (HIGH) — Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H - CVSS v4.0 Base Score: 8.8 (HIGH) — Vector:
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
Mitigation and recommended actions
- Immediate: Upgrade PictShare to version 3.7.1 or later, which whitelists the fields returned by the info API, enforces strict delete-code comparison via
hash_equals(), rejects empty delete codes, and switches delete-code generation torandom_int(). - Note: Delete codes issued before upgrading are not automatically rotated by the patch; administrators should treat previously issued delete codes as potentially exposed.
- If immediate patching is not possible: restrict network access to the PictShare instance (e.g., via firewall rules, VPN, or authentication proxy) to reduce exposure to unauthenticated attackers, and monitor logs for unexpected delete operations.

