Skip to main content
Vulnerability Database/CVE-2026-104051

CVE-2026-104051: PictShare Information Disclosure Vulnerability

CVE-2026-104051 is an information disclosure flaw in PictShare that exposes sensitive metadata including delete codes and uploader information. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-104051 Overview

CVE-2026-104051 is an information disclosure vulnerability in PictShare versions prior to 3.7.1. The API::info() endpoint returns the complete raw metadata object for any file hash without applying a field whitelist. Unauthenticated attackers can retrieve the secret delete_code along with uploader metadata by supplying a publicly visible file hash. Attackers then invoke the delete API with the leaked code to permanently remove arbitrary files. The flaw also exposes uploader IP address, User Agent string, remote port, and SHA-1 hash. The weakness is classified as [CWE-522] Insufficiently Protected Credentials.

Critical Impact

Unauthenticated attackers can enumerate file hashes, extract delete codes, and permanently destroy arbitrary uploaded files while harvesting uploader identifiers.

Affected Products

  • PictShare versions before 3.7.1
  • HaschekSolutions PictShare image hosting platform
  • Deployments exposing the /api/info endpoint to untrusted networks

Discovery Timeline

  • 2026-10-01 - CVE-2026-104051 published to NVD
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-104051

Vulnerability Analysis

PictShare stores per-upload metadata in a meta.json file keyed by the file hash. The metadata record contains both public fields (such as mime, size, and uploaded) and sensitive fields (delete_code, uploader ip, useragent, remote_port, and sha1). The vulnerable API::info() method returned the entire structure through getMetadataOfHash($hash) without filtering. Any client that knows or guesses a hash — which is exposed in public share URLs — receives the full record. The delete_code is the sole authorization token for the destructive delete API, so leaking it collapses the access control model for file deletion. Secondary impact includes uploader deanonymization through the leaked IP and User Agent.

Root Cause

The root cause is missing output filtering on sensitive object fields. The info() endpoint trusted its data source and emitted all stored metadata keys to the response. The server-side authorization check in the delete flow depended on the secrecy of delete_code, violating the principle that security tokens must never travel through adjacent public read endpoints.

Attack Vector

An unauthenticated remote attacker requests /api/info/<hash> using any file hash that appears in a public share URL. The response contains delete_code. The attacker then issues a request to the delete endpoint with the hash and the leaked code to remove the file. The attack requires no privileges, no user interaction, and no complex preconditions.

php
// Vulnerable implementation (pre-patch) returned the full metadata object
// return getMetadataOfHash($hash);

// Patched implementation in src/inc/api.class.php restricts the response
// to an explicit field allowlist
if (!isExistingHash($hash))
    return ['status' => 'err', 'reason' => 'Hash not found'];

// meta.json also holds the delete code, uploader details (ip, useragent, ..), the
// original filename and view stats, so only fields that are safe to show to
// anyone who knows the hash are returned
$public = ['mime', 'size', 'size_human', 'hash', 'sha1', 'uploaded', 'type', 'hashes', 'created'];

return array_intersect_key(getMetadataOfHash($hash) ?: [], array_flip($public));

Source: GitHub Commit ce5fc47

Detection Methods for CVE-2026-104051

Indicators of Compromise

  • Unexpected HTTP GET requests to /api/info/<hash> from unfamiliar source IPs, especially in rapid sequences across multiple hashes.
  • Delete API calls that immediately follow an info call for the same hash from the same source IP.
  • Entries in logs/deletes.log where the deleting IP does not match the original uploader IP recorded in the corresponding meta.json.
  • Sudden drops in stored file counts without a corresponding administrative action.

Detection Strategies

  • Enable web server access logging and search for /api/info/ requests paired with subsequent /api/delete/ requests from the same client.
  • Baseline normal info endpoint usage and alert on volumetric anomalies that suggest enumeration.
  • Correlate uploader IP recorded in metadata against the deleting IP in deletes.log to flag mismatches.

Monitoring Recommendations

  • Forward PictShare application and web server logs to a centralized log platform for retention and correlation.
  • Monitor for recursive crawling of share URLs that could be used to harvest valid hashes.
  • Alert on any traffic to /api/info/ or /api/delete/ from source networks outside expected user geographies.

How to Mitigate CVE-2026-104051

Immediate Actions Required

  • Upgrade PictShare to version 3.7.1 or later, which applies the field allowlist in API::info().
  • Audit logs/deletes.log and uploaded file inventories for unauthorized deletions since the deployment date.
  • Restrict public access to the /api path at the reverse proxy if an upgrade cannot be deployed immediately.

Patch Information

The fix is published in PictShare release v3.7.1 and implemented in commit ce5fc47. The patch introduces an explicit $public field allowlist via array_intersect_key in src/inc/api.class.php, and replaces the direct delete_code comparison in src/inc/core.php with a new isValidDeleteCode() helper that rejects empty codes. Additional details are available in the VulnCheck advisory.

Workarounds

  • Block or require authentication on the /api/info route at the reverse proxy or web application firewall until the patch is applied.
  • Define MASTER_DELETE_IP to a trusted administrative address and ensure MASTER_DELETE_CODE is not left at an empty default.
  • Rotate any delete codes by re-uploading critical assets after upgrading.
bash
# Example nginx snippet to restrict the info endpoint pending upgrade
location ~* ^/api/info/ {
    allow 10.0.0.0/8;
    deny all;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.