Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach Photoview download endpoint over network
-
DeliveryCraft SQL payload in album_id path segment
-
ExploitInjection executes via unparameterized db.Find query
-
ExecutionInfer results via time-based/blind responses
-
ImpactExfiltrate arbitrary database data
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | No special conditions - remote unauthenticated exploitation against default configurations of Photoview through 2.4.0, targeting the album download route by manipulating the album_id path segment. The pre-patch handler performed no type or bounds validation before using the value in a GORM query, so any internet- or LAN-reachable instance is exploitable without credentials or user interaction. The only limiting factor is network reachability of the Photoview API; the product's typical self-hosted, single-user/home-lab deployment (rather than any authentication or non-default setting) is what constrains real-world exposure. |
| Impact | The CVSS 4.0 base score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H) reflects a genuinely serious, low-friction issue: an unauthenticated, network-reachable SQL injection in Photoview's album download route requiring no user interaction and no special conditions against a default install. The source-code evidence corroborates the description - the pre-patch handler passed the raw |
| Exploit ScenarioDerived | An unauthenticated attacker sends a GET request to the album download route (e.g. /api/download/album/<album_id>/...) substituting the numeric album_id with a crafted SQL payload such as a time-based |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 23, 2026
Unauthenticated SQL injection in Photoview through 2.4.0 lets remote attackers read arbitrary data from the application database by manipulating the album_id path segment of the album download route. Because the pre-patch handler used the raw path value directly in a GORM lookup before any authentication or authorization check ran, any internet- or LAN-reachable instance is exploitable without credentials or user interaction, with impact limited to confidentiality (CVSS 4.0 base 8.7; assessed CVSS 3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N). A vendor fix has been merged upstream via pull request 1453; no public exploit code was identified at time of analysis, and the issue is not confirmed as actively exploited (CISA KEV).
RemediationAI
Apply the vendor fix: the upstream patch is merged in https://github.com/photoview/photoview/pull/1453 (commit deb1b216e047a30803dc0f48a9fc3d4c4abda594), so upgrade to a Photoview release that includes that commit; the patch converts album_id to an integer with strconv.Atoi, rejects invalid, zero, and negative IDs with HTTP 400, and replaces the string-concatenated GORM lookup with the parameterized db.First(&album, "id = ?", albumID). Because the fix is delivered via a pull request/commit rather than a confirmed tagged release, verify the deployed build actually contains the patched code before considering the instance remediated. If an immediate upgrade is not possible, reduce exposure of the album download route: place Photoview behind a reverse proxy or VPN and do not expose its API directly to the internet, which removes the unauthenticated remote vector entirely; alternatively, add a proxy-level allowlist/rewrite rule that only forwards numeric album_id segments (for example an nginx location regex matching ^/album/[0-9]+/original$ before proxying) and returns 400 for anything else, which blocks injection payloads but will break links or clients that pass non-numeric IDs. A WAF rule blocking SQL metacharacters and whitespace/comment sequences in the album_id path segment can add defense in depth, though such rules are bypassable and should not replace patching. No modification to database permissions is required once the parameterized query is in place.
Affected VersionsENISA
Affected Packages
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
Photoview is a self-hosted photo and video library written in Go, using the gorilla/mux router and the GORM ORM on top of a SQL database. The vulnerable route (api/routes/downloads.go, lines 19-29 in v2.4.0) read the album_id path variable as a raw string and passed it straight into a GORM lookup (db.Find(&album, albumID)) without type or bounds validation. GORM interprets a non-integer argument as a SQL condition rather than a primary key value, so attacker-supplied text was concatenated into the generated query, the classic CWE-89 improper neutralization of special elements used in an SQL command. The fix converts album_id with strconv.Atoi, rejects non-numeric, zero, and negative values with HTTP 400, and switches the lookup to the parameterized form db.First(&album, "id = ?", albumID), which binds the value rather than building a condition from it. The accompanying tests exercise text, boolean ('id=1 OR 1=1'), time-based ('id=1 AND SLEEP(1)'), zero, negative, and integer-overflow payloads, confirming that blind and time-based extraction techniques were viable against the original code path.
Know when Photoview 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Unauthenticated remote SQL injection with no interaction (AV:N/AC:L/PR:N/UI:N); blind/time-based data extraction in a SELECT context gives full read (C:H) but no shown write or DoS, so I:N/A:N.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Photoview through 2.4.0 contains an SQL injection vulnerability in the album download route that allows unauthenticated attackers to inject SQL by manipulating the album_id path segment. Attackers can supply crafted SQL expressions in the album_id parameter to extract arbitrary data from the database using time-based or blind injection techniques.
Executive ViewAI
Photoview deployments at version 2.4.0 and earlier are exposed to an unauthenticated database read vulnerability, meaning anyone who can reach the service over the internet or the local network can extract the contents of its database without any credentials or user interaction. Because the affected album download endpoint is processed before any access control is enforced, the exposure is not limited to trusted internal users and extends to any internet-facing photo library instance. Leadership should care because the leaked data can include user account records, session and API secrets, and metadata about private photo collections, with reputational and privacy-notification consequences rather than service disruption.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
EUVD-2026-85345
GHSA-2mp4-gjj5-8xj5
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB