/

CVE-2026-96673

Severity:

HIGH RISK

(7.5)

SQL Injection (CWE-89) in Photoview Album Download

CVE-2026-96673

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized Database Access and Data Disclosure

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Photoview through version 2.4.0 contains a SQL injection vulnerability in its album download route. An unauthenticated attacker may manipulate the album identifier in the URL to run crafted database queries and extract arbitrary stored data through blind or time-based techniques.

Affected context

The vulnerability occurs in Photoview's album download endpoint when the album identifier from the request path is incorporated into a database query without adequate parameterization or validation. Because the route is accessible without authentication, deployments exposing this endpoint to untrusted networks may have a broader attack surface.

Exploit preconditions

  • Attack surface: HTTP album download route
  • Required access: No authentication may be required
  • Trigger point: Processing of the album_id path segment
  • Why exploitation is possible: User-controlled input may influence SQL statement execution instead of being handled solely as a data value

Why this happens

The underlying issue is an insufficient separation between SQL code and user-supplied data. When a path parameter is concatenated into a query or otherwise processed without reliable parameter binding, crafted expressions can alter query behavior. This represents CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL injection.

Potential impact

  • An attacker may retrieve arbitrary data from accessible database tables
  • Sensitive user, album, or application information could be disclosed
  • Database contents may be inferred through blind or time-based responses
  • Queries could potentially be altered beyond the intended album lookup
  • Application availability or data integrity could be affected, depending on database privileges

General mitigation guidance

Mitigation generally centers on ensuring that all request-derived values remain data rather than executable SQL.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for album lookups
  • Apply strict type and range validation to identifier inputs
  • Avoid constructing SQL statements through string concatenation
  • Limit database account permissions to only the operations the application requires
  • Keep sensitive database services isolated from untrusted networks
  • Return uniform errors and responses that do not expose query details or timing information

How teams detect issues like this

Organizations can look for SQL injection risks through:

  • Static analysis rules identifying string-built SQL statements involving route parameters
  • Code review checks for missing parameter binding and weak identifier validation
  • Dynamic testing of public endpoints with safe injection-detection techniques
  • Web application firewall or API gateway policies for suspicious SQL metacharacters and expressions
  • Database monitoring for anomalous query timing, syntax errors, and unusual read patterns
  • Automated security review tools that flag unparameterized database access

Sources

SourceLink
github.comgithub.com/photoview/photoview
github.comgithub.com/photoview/photoview/blob/v2.4.0/api/routes/downloads.go#L19-L29
github.comgithub.com/photoview/photoview/commit/deb1b216e047a30803dc0f48a9fc3d4c4abda594
github.comgithub.com/photoview/photoview/pull/1453
hackmd.iohackmd.io/@leediay/sqli-in-download-photoview
vulncheck.comvulncheck.com/advisories/photoview-through-2.4.0-sql-injection-via-album-download-route

Frequently asked

questions

Yes. The described album download route can be reached by unauthenticated attackers, so an exposed deployment may be directly targeted.

The attacker needs network access to the affected HTTP endpoint. They do not necessarily need an account or legitimate album access.

Use parameterized queries or prepared statements and validate the album identifier against the expected data type before database access.

Enforce parameter binding through database access abstractions, review every request-to-query data flow, apply least-privilege database permissions, and continuously test externally reachable endpoints.

Find out what's already
exploitable in your codebase.