/

CVE-2026-21875

Severity:

CRITICAL RISK

(9.8)

SQL Injection in ClipBucket v5 Channel Comment Handling

CVE-2026-21875

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Database Compromise and Remote Data Exfiltration

Severity:

CRITICAL RISK

(9.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

ClipBucket v5 contains a blind SQL injection vulnerability in the channel comment feature, where user-supplied data is concatenated directly into SQL queries without validation.

An attacker who can submit comments to a channel can manipulate the obj_id parameter in a POST request to /actions/ajax.php to infer database content, potentially leading to full compromise of the application's data.

Affected context

This vulnerability occurs in ClipBucket v5 installations, specifically versions 5.5.2-#187 and below, when channel comments are enabled and processed via the /actions/ajax.php endpoint.

The issue manifests when the obj_id parameter from a POST request is passed unvalidated into the user_exists method and then into the database count function, where it is concatenated into a SQL query.

Any deployment that exposes this functionality to untrusted users, such as public-facing video sharing portals, may be affected.

Exploit preconditions

  • Attack surface: Web application endpoint /actions/ajax.php handling channel comment submission.
  • Required access: Ability to submit a comment on a channel (typically unauthenticated or low-privilege authenticated user, depending on site configuration).
  • Trigger point: Supplying crafted input in the obj_id POST parameter when adding a comment to a channel.
  • Why exploitation is possible: The obj_id value is interpolated directly into a SQL query inside the user_exists → count call chain without input validation, sanitization, or the use of parameterized queries, enabling blind SQL injection via boolean/time-based inferences.

Why this happens

The core issue aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

Application logic takes an HTTP POST parameter (obj_id) and passes it through multiple layers (ajax.php → user.class.php → db.class.php) until it is concatenated into an SQL string.

This pattern treats user-controlled data as trusted, allowing special SQL characters such as ', =, and comment markers (--) to alter the intended query structure.

The absence of parameterized queries, escaping, or strict typing for identifiers results in a blind SQL injection condition, where attackers can infer database state through query success/failure or response timing.

Potential impact

  • Extraction of sensitive data from the application database (e.g., user profiles, email addresses, hashed passwords).
  • Enumeration of database schema, including table and column names.
  • Escalation of privileges by modifying account records or role mappings stored in the database.
  • Insertion or modification of application data, potentially leading to integrity violations (e.g., fake users, manipulated video metadata, or comments).
  • Facilitation of further attacks, such as session hijacking, credential stuffing, or targeted phishing based on exfiltrated information.

General mitigation guidance

Effective mitigation focuses on removing direct string concatenation of user-controlled data into SQL queries and reducing trust in request parameters.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database interactions, especially where user input influences query structure or identifiers.
  • Introducing strict validation and normalization for parameters like obj_id, ensuring they conform to expected formats (such as numeric IDs) before reaching the data access layer.
  • Implementing a centralized database abstraction layer that enforces safe query-building patterns and forbids ad-hoc string concatenation.
  • Applying least-privilege principles to the database account used by the application, restricting its ability to perform destructive or administrative operations.
  • Adding application-level input handling policies (e.g., rejecting unexpected characters or patterns in IDs) to narrow the attack surface.

How teams detect issues like this

Organizations can detect and monitor for this vulnerability class using a combination of static and dynamic approaches:

  • Static analysis: Configure SAST tools or custom linters to flag SQL query construction that uses string concatenation with HTTP parameters or untrusted variables. Focus on patterns where request variables propagate into data access methods without sanitization.
  • Code review: During manual reviews, look for database access layers (db.class.php, similar wrappers) that accept raw strings, as well as any use of concatenation for WHERE clauses or identifiers. Verify that all queries are parameterized and that input types are enforced.
  • Dynamic testing: Employ DAST tools or manual penetration tests to probe endpoints like /actions/ajax.php with typical SQL injection payload patterns and analyze differences in responses, errors, or timing that indicate blind SQL injection.
  • Runtime monitoring: Enable application and database logging to detect anomalous query patterns, such as unexpected comment markers, tautological conditions (e.g., 1=1), or repeated queries with small input variations.

Sources

SourceLink
github.comgithub.com/MacWarrior/clipbucket-v5/security/advisories/GHSA-crpv-fmc4-j392

Frequently asked

questions

The vulnerability is typically exploitable by any user who can submit comments to channels, which in many deployments includes anonymous or low-privilege users. Because the flaw is blind SQL injection, exploitation may require more effort but can still lead to serious data compromise.

No elevated privileges or direct database access are required. The attacker interacts only with the web application endpoint (/actions/ajax.php) and leverages the application's database account indirectly via crafted obj_id values.

The most robust fix is to refactor all affected queries to use parameterized statements and enforce strict typing on inputs like obj_id. Additionally, centralizing query construction in a well-reviewed data access layer reduces the likelihood of new injection points being introduced.

Establish coding standards that prohibit SQL string concatenation with user input, adopt ORMs or query builders that default to parameterization, enforce input validation at boundaries, and integrate static analysis and security checks into CI pipelines to catch unsafe patterns early.

Find out what's already
exploitable in your codebase.