Summary
CVE-2026-104356 is a weak-randomness vulnerability (CWE-338) in PictShare, a self-hosted open-source image/video/pastebin hosting application maintained by HaschekSolutions. The getRandomString() function used to generate the delete_code authorization token relies on the non-cryptographic rand() pseudo-random number generator, making delete codes predictable and allowing unauthenticated attackers to forge valid deletion tokens for hosted files. The issue affects PictShare versions 2.0.0 up to (but not including) 3.7.1 and carries a CVSS v4.0 base score of 8.2 (High).
Technical details
- Root cause: the
getRandomString()function insrc/inc/core.phpgenerates thedelete_code— the authorization token required to delete an uploaded file — using the standard C libraryrand()function rather than a cryptographically secure random number generator. rand()-based output sequences are predictable, enabling an attacker who can observe or infer PRNG state to compute or brute-force validdelete_codevalues for files they do not own.- Attack vector is network-based, requires no privileges and no user interaction, but has high attack complexity under CVSS v4.0 scoring.
- Impact: unauthorized, unauthenticated deletion of hosted images, videos, or pastes, resulting in a high impact to availability of stored content; confidentiality and integrity are not directly affected.
Affected software
- HaschekSolutions PictShare versions >= 2.0.0 and < 3.7.1
Severity
- CVSS v3.1 Base Score: 5.9 (Medium) —
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS v4.0 Base Score: 8.2 (High) —
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/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 replaces the insecure
rand()-based token generation with a cryptographically secure random number generator. - If immediate patching is not possible: restrict or disable public access to delete endpoints at the network/reverse-proxy layer, rotate/invalidate existing delete codes where feasible, and monitor for abnormal deletion request patterns against the PictShare API.

