/

CVE-2026-44521

Severity:

HIGH RISK

(8.8)

SQL Injection in elFinder MySQL Volume Driver

CVE-2026-44521

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Authenticated Data Exposure and Denial of Service via SQL Injection

Severity:

HIGH RISK

(8.8)

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

An authenticated SQL injection issue in the elFinder MySQL volume driver allows logged-in users, including those with read-only access, to inject arbitrary SQL via a crafted target file hash.

When elFinder is configured to use the MySQL volume backend, this flaw can expose sensitive data and disrupt service availability.

Affected context

This vulnerability arises in deployments of elFinder that:

  • Use the MySQL volume driver (elFinderVolumeMySQL) as a backend for file metadata and indexing
  • Allow authenticated users (even read-only) to browse or interact with the affected volume
  • Derive database queries from file identifiers or hashes without robust parameterization

Environments relying on other storage backends or volume drivers are not directly impacted by this specific issue.

Exploit preconditions

  • Attack surface: Web interface or API endpoints that accept file identifiers or hashes and route them to elFinderVolumeMySQL.
  • Required access: Valid authenticated user session with access to the affected MySQL-backed volume; no elevated privileges required beyond basic or read-only access.
  • Trigger point: Submission of a crafted target file hash or similar identifier that is incorporated into SQL queries.
  • Why exploitation is possible: The target hash value is concatenated or interpolated into SQL statements without using safe parameterization or sufficient validation, allowing attacker-controlled input to alter query structure.

Why this happens

The root cause is improper neutralization of user-supplied data when constructing SQL queries in the MySQL volume driver.

Instead of using prepared statements or robust parameter binding, the implementation incorporates the target file hash directly into query strings.

This pattern maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where input intended to be data is interpreted as part of the SQL command, enabling attackers to modify query logic.

Potential impact

  • Retrieval of unauthorized data from the underlying database, including file metadata and potentially related application tables
  • Deletion or corruption of metadata records, impacting file management operations
  • Denial of service by causing expensive or malformed queries that degrade database performance or lead to outages
  • Lateral data exposure if the database account used by elFinder has broader access than strictly necessary

General mitigation guidance

Effective mitigation focuses on isolating untrusted input from SQL execution and minimizing the privileges of database operations:

  • Use parameterized queries and prepared statements for all interactions involving user-controllable values, such as file hashes or identifiers.
  • Introduce strict input validation and canonicalization for identifiers, ensuring they conform to expected formats (e.g., fixed-length hashes, restricted character sets).
  • Apply the principle of least privilege to the database account used by the volume driver so that compromised queries have limited reach.
  • Introduce architectural patterns that separate file identifier handling from direct SQL construction, such as using ORM abstractions or query builders that enforce parameter binding by default.
  • Consider defense-in-depth controls like database-level query restrictions, read-only roles for browsing operations, and rate limiting to reduce the blast radius of exploit attempts.

How teams detect issues like this

Organizations can detect this class of vulnerability and related misuse patterns using a combination of static and runtime techniques:

  • Static analysis rules that flag dynamic SQL construction, string concatenation, or interpolation involving request parameters, file identifiers, or hashes inside database access code.
  • Code review checklists emphasizing verification that volume driver implementations consistently use prepared statements and avoid inline SQL building.
  • Automated security testing (DAST) that sends crafted file hashes and identifiers through elFinder endpoints to observe anomalous database error responses or unexpected result sets.
  • Database monitoring and logging to detect suspicious query patterns, such as injected logical operators, stacked queries (where supported), or unusual access to unrelated tables originating from the elFinder application user.

Sources

SourceLink
github.comgithub.com/Studio-42/elFinder/security/advisories/GHSA-c3gj-q88f-7hqj

Frequently asked

questions

Yes, if elFinder is exposed over the network and accessible to authenticated users, an attacker can exploit the issue remotely via crafted requests involving file hashes or identifiers.

No. The issue can be triggered by any authenticated user with access to the affected MySQL-backed volume, including accounts limited to read-only operations, as the vulnerability lies in query construction, not permission checks.

The most robust fix pattern is to ensure all database interactions in the MySQL volume driver use parameterized queries or prepared statements, combined with strict validation of identifiers and hashes before passing them to the database layer.

Adopting a secure-by-default data access layer—such as using ORMs or query builders that enforce parameter binding—combined with consistent input validation, code review practices targeting dynamic SQL, and automated static analysis for SQL injection patterns can significantly reduce the likelihood of similar vulnerabilities.

Find out what's already
exploitable in your codebase.