Skip to main content

PictShare CVE-2026-104356

| EUVDEUVD-2026-91072 HIGH
Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) (CWE-338)
2026-10-01 VulnCheck GHSA-6654-r2c2-m62r
8.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain target file hash from public URL
  2. Delivery
    Infer or recover rand() PRNG state
  3. Exploit
    Compute predicted delete_code for hash
  4. Execution
    Submit delete request with forged code
  5. Impact
    Unauthorized deletion of hosted file

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Cryptographic PRNG selection
Exploitation Conditions

Exploitation requires that the target PictShare instance run a version before 3.7.1 where getRandomString() in src/inc/core.php builds the delete_code from the non-cryptographic rand() PRNG. The attacker must know the target file's hash (exposed in public PictShare URLs) and must infer or recover the rand() PRNG state well enough to reproduce the generated delete_code - this PRNG-prediction requirement is the HIGH attack-complexity (AC:H) limiter and is the main factor constraining real-world exploitation. No authentication (PR:N) and no user interaction (UI:N) are needed against default configurations. Impact is limited to unauthorized file deletion (availability); it does not grant data disclosure. Instances on 3.7.1+ (using random_int()) are not affected, and the pre-patch info endpoint exposure of delete_code is a separate, now-fixed leakage path.

Impact

This is a genuine but bounded-impact authorization weakness, not a top-tier emergency. The only provided scoring signal is the vendor/NVD CVSS 4.0 vector (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, base 8.2), which shows network, unauthenticated, no-user-interaction exploitation but HIGH attack complexity, and impact limited strictly to availability (VA:H) - specifically unauthorized deletion of hosted files, with zero confidentiality or integrity impact (VC:N/VI:N). No EPSS score, no CISA KEV entry, and no public POC were supplied, so there is no public exploit identified at time of analysis and no evidence of active exploitation. The elevated 8.2 is driven mainly by the 4.0 scoring model's treatment of unauthenticated network access against a high-value impact, but the AC:H metric is doing important work here: successful exploitation requires actually predicting or recovering the PHP rand() PRNG state, which is non-trivial and server-state-dependent. Net: this is a real, patch-worthy authorization flaw (predictable delete_code lets an attacker bypass the delete token), but given a niche self-hosted product, availability-only impact, high complexity, and no exploitation/POC signals, it is a moderate priority rather than a drop-everything issue. Note the scoring covers only file deletion; the same patch also hardened the info endpoint that previously leaked the delete_code, which is a related but separately-scored exposure.

Exploit ScenarioDerived

An attacker who knows the public hash of a hosted file (hashes appear in PictShare URLs) analyzes the server's weak rand()-based token generation to predict the delete_code tied to that file, then submits a delete request with the guessed code to destroy the file without ever reading the code from the info endpoint. Because the PRNG is seeded and advanced predictably, an attacker able to observe or infer PRNG state can forge valid delete tokens for arbitrary hosted files. No public POC was provided, and the HIGH attack complexity reflects the effort needed to recover the PRNG state.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 01, 2026

PictShare versions before 3.7.1 generate the per-file delete_code authorization token using PHP's non-cryptographic rand() PRNG, allowing an attacker who knows a hosted file's hash to predict or infer valid delete codes and delete other users' uploads without authorization. The vulnerability is remotely reachable and requires no authentication or user interaction (CVSS:4.0 AV:N/PR:N/UI:N), but exploitation is constrained by HIGH attack complexity (AC:H) because the attacker must reconstruct the PRNG state; the resulting impact is availability-only (VA:H) and grants no data disclosure. No public exploit code was identified at time of analysis and there is no CISA KEV listing; vendor-released patch: 3.7.1.

RemediationAI

Upgrade to PictShare 3.7.1 or later, the vendor-released patch that swaps rand() for random_int() and routes both delete paths through isValidDeleteCode(); apply the upstream commit ce5fc474 if you track source directly, and take the release from https://github.com/HaschekSolutions/pictshare/releases/tag/v3.7.1 (advisory: https://www.vulncheck.com/advisories/pictshare-predictable-delete-code-via-rand). Upgrading also closes the companion information leak, since API::info() now returns only whitelisted metadata (mime, size, hash, sha1, uploaded, type, hashes, created) instead of the full meta.json containing delete_code and uploader details, and empty codes such as /delete_/<hash> or /delete_0/<hash> no longer succeed - including on hashes with no stored delete_code, where the Docker default MASTER_DELETE_CODE='' previously opened a bypass. If immediate patching is not possible, compensating controls are: put the upload/delete endpoints behind an authenticating reverse proxy or deny external access entirely (trade-off: breaks the anonymous upload model, and delete links on existing files remain guessable to anyone with proxy access); and if you have set MASTER_DELETE_CODE or MASTER_DELETE_IP, remember these are master credentials that bypass all per-file codes and should be rotated or unset. There is no way to retroactively re-key delete codes for existing files without patch-level code changes, so deleting and re-uploading sensitive content after upgrading is the only way to fully invalidate previously predictable tokens.

Affected VersionsENISA

pictshare 2.0.0 <3.7.1

Affected Packages

euvd pictshare fix: 3.7.1

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-338 (Use of Cryptographically Weak Pseudo-Random Number Generator), located in getRandomString() in src/inc/core.php of the PHP-based PictShare image/file hosting application. That function built the delete_code by indexing a keyspace with rand(0, $max) - PHP's deterministic, non-cryptographic Mersenne Twister PRNG - so tokens are a function of a seedable, recoverable generator state rather than OS entropy. Because PictShare exposes file hashes in public URLs, an attacker with a target hash can attempt to reproduce the sequence and submit candidate codes to the delete endpoint. The upstream fix (commit ce5fc474, released as v3.7.1) replaces rand() with random_int(), which draws from the CSPRNG, and consolidates authorization into a new isValidDeleteCode() helper that rejects empty or non-string codes and compares with hash_equals() to avoid timing side channels and empty-code bypasses. The same commit additionally hardens API::info() so meta.json fields - delete_code, delete_url, uploader IP/useragent/remote_port, original_filename, and view statistics - are no longer returned, whitelisting only mime, size, size_human, hash, sha1, uploaded, type, hashes, and created. The CPE cpe:2.3:a:hascheksolutions:pictshare:* identifies all releases prior to 3.7.1 as affected. The pre-3.7.1 info-endpoint leakage of delete_code is a distinct, separately fixed disclosure path and is not required for this attack.

Know when Pictshare 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

Vendor (VulnCheck) PRIMARY 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
vuln.today AI 5.9 MEDIUM

Network-reachable and unauthenticated (AV:N/PR:N), but recovering the rand() PRNG state to forge a valid code makes it AC:H; impact is file deletion so A:H with C:N/I:N.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

PictShare before version 3.7.1 contains a weak randomness vulnerability where the getRandomString() function uses the non-cryptographic rand() PRNG to generate the delete_code authorization token in src/inc/core.php. Attackers can predict or infer the PRNG state to guess valid delete_code values and perform unauthorized deletion of hosted files without needing to read the code from the info endpoint.

Executive ViewAI

Why It Matters

PictShare deployments running versions prior to 3.7.1 contain a high-severity weakness that lets an unauthenticated attacker delete files hosted by other users, making it a data availability and integrity concern for any team relying on the platform for shared uploads. Because no credentials or user interaction are required, any internet-exposed instance is theoretically reachable, though exploitation requires reconstructing the underlying random number generator state and yields no data disclosure. Leadership should care primarily about loss of hosted content and the operational disruption of restoring deleted uploads; a vendor fix (3.7.1) is already available.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 78% exploitable
Prevalence
Low
self-hosted open-source image host, hobbyist/self-hoster niche, no enterprise footprint
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Medium
Technical Impact
Partial

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy