/

CVE-2026-33767

Severity:

HIGH RISK

(8.8)

SQL Injection in WWBN AVideo like.php getLike() Videos Query

CVE-2026-33767

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Execution / Data Compromise

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

WWBN AVideo up to and including version 26.0 contains a SQL injection vulnerability in the getLike() method of objects/like.php, where videos_id is concatenated directly into a query string.

An attacker who can control the videos_id parameter through crafted requests may inject arbitrary SQL, potentially reading, modifying, or deleting data despite partial use of prepared statements.

Affected context

The vulnerability appears in the getLike() method responsible for retrieving like information associated with videos.

The query uses a prepared statement placeholder for users_id but embeds $this->videos_id directly into the SQL string, without parameterization or robust input validation.

This issue typically manifests in deployments where user-supplied values are used to set videos_id, such as via HTTP request parameters or route variables, and the application connects to a relational database with sufficient privileges to access user, video, or other business-critical tables.

Exploit preconditions

  • Attack surface: Web-facing endpoints that ultimately call objects/like.php::getLike() and allow the client to influence videos_id.
  • Required access: Ability to send crafted HTTP requests to the AVideo instance; no direct database access is required.
  • Trigger point: Invocation of getLike() with an attacker-controlled videos_id value that is concatenated into the SQL query.
  • Why exploitation is possible: The code mixes parameterized and non-parameterized input handling: users_id is bound as a prepared-statement parameter, while videos_id is interpolated directly into the SQL string. This selective parameterization leaves a portion of the query structure controllable by the attacker, enabling injection.

Why this happens

This vulnerability is a classic instance of CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

The underlying bug is the unsafe construction of SQL using string concatenation for $this->videos_id instead of binding it as a parameter in the prepared statement.

By allowing user-controllable data to participate directly in the SQL syntax (e.g., inside a WHERE clause) without neutralization or parameterization, the query parser interprets injected tokens as part of the command rather than data.

The presence of a prepared statement for users_id may give a false sense of security, but partial use of prepared statements does not protect fields that remain embedded directly into the SQL string.

Potential impact

  • An attacker could read sensitive information from other tables, including user records or configuration data, if database permissions allow.
  • An attacker could modify or delete video metadata, likes, or related content stored in the database.
  • An attacker could create or escalate application-level accounts or permissions by manipulating authentication- or authorization-related tables.
  • Under permissive database configurations, an attacker could manipulate database schema or plant malicious data for subsequent attacks.
  • In some environments, SQL injection could be chained with other weaknesses to impact the underlying host or adjacent services.

General mitigation guidance

Effective mitigation focuses on eliminating unsafe query construction and reducing the trust placed in client-supplied identifiers:

  • Treat all inputs that influence SQL, including IDs like videos_id, as untrusted and always bind them as parameters in prepared statements rather than interpolating them into query strings.
  • Use a database abstraction layer or ORM that encourages query building through parameterized APIs instead of manual string concatenation.
  • Centralize data access logic so that all SQL is constructed through vetted helper functions that enforce parameterization by default.
  • Apply strict server-side validation and normalization of identifier fields (e.g., enforcing numeric types and expected ranges) before they are used in any database operations.
  • Configure database accounts with least-privilege access, limiting the impact of any injection attempt to only the data and operations required by AVideo.

How teams detect issues like this

Organizations can detect and monitor for this class of issue using a combination of proactive and reactive approaches:

  • Static analysis: Use SAST tools or custom rules to flag direct concatenation of variables into SQL strings, especially where only some parameters are passed via prepared statements.
  • Code review: During manual review, pay attention to data access layers and look for mixed patterns where some fields are parameterized but others are interpolated directly.
  • Security testing: Employ dynamic application security testing (DAST) or manual penetration testing to send crafted inputs through endpoints that reference videos_id and observe for SQL error messages or anomalous responses.
  • Logging and monitoring: Monitor database logs for unusual queries with unexpected structure and application logs for SQL errors that might indicate injection attempts.

Sources

SourceLink
github.comgithub.com/WWBN/AVideo/commit/0215d3c4f1ee748b8880254967b51784b8ac4080
github.comgithub.com/WWBN/AVideo/security/advisories/GHSA-fj74-qxj7-r3vc

Frequently asked

questions

Exploitability depends on where and how videos_id is sourced. If a public or low-privilege endpoint allows users to influence videos_id and triggers getLike(), the issue can be exploited remotely by unauthenticated or minimally authenticated attackers.

The attacker only needs the ability to send HTTP requests that ultimately set videos_id in a way that reaches the vulnerable SQL construction. No database credentials are necessary; the attack leverages the application's existing database connection.

The most robust fix is to ensure that all variables, including videos_id, are bound via prepared-statement parameters and never concatenated into SQL strings. This should be applied consistently across the codebase so no query includes unparameterized user input.

Adopt a coding standard that prohibits building SQL via string concatenation with untrusted data, enforce the use of parameterized queries or ORM query builders by default, integrate static analysis into CI pipelines to flag violations, and perform regular security-focused code reviews of database access layers.

Find out what's already
exploitable in your codebase.