/

CVE-2026-33770

Severity:

CRITICAL RISK

(9.8)

SQL Injection in WWBN AVideo Category Title Handling

CVE-2026-33770

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Execution / Database Compromise

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

WWBN AVideo versions up to and including 26.0 contain a SQL injection vulnerability in the fixCleanTitle() method, where category titles and IDs are directly concatenated into a SELECT query.

An attacker who can create or rename categories with crafted title values may inject arbitrary SQL, potentially leading to data exfiltration, data tampering, or full database compromise.

Affected context

The vulnerability occurs in the category management logic of WWBN AVideo, specifically in objects/category.php within the fixCleanTitle() static method.

It is relevant in deployments where user-supplied category names or titles can be influenced by untrusted users—directly via the UI, indirectly via integrations, or through automation that forwards user input.

The risk is most pronounced when the database account used by the application has broad privileges (e.g., read/write to many tables, account management, or schema modification).

Exploit preconditions

  • Attack surface: Web application endpoints that create, rename, or otherwise manipulate categories, ultimately passing data into fixCleanTitle().
  • Required access: Ability to supply or influence category titles or related parameters; this may be authenticated or unauthenticated depending on how category management is exposed.
  • Trigger point: Invocation of fixCleanTitle() when a crafted category title or ID is processed and used to build a SQL SELECT query.
  • Why exploitation is possible: The method interpolates $clean_title and $id directly into the SQL string without prepared statements, parameter binding, or robust input sanitization, allowing attacker-controlled input to break out of the intended query structure.

Why this happens

The core issue is the use of string concatenation to build SQL queries from untrusted input instead of using parameterized queries or prepared statements.

In fixCleanTitle(), both the normalized category title ($clean_title) and the category identifier ($id) are inserted directly into the query text, trusting that input will not alter the query's semantics.

This pattern aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command, where missing or ineffective neutralization allows attackers to inject additional SQL clauses, unions, or subqueries.

The vulnerability is a design and implementation flaw in the data access layer, where input validation and query construction responsibilities are not clearly separated, leading to unsafe query composition.

Potential impact

  • Extraction of sensitive data from the AVideo database, including user information and configuration data.
  • Modification or deletion of video metadata, categories, and other application content.
  • Creation, alteration, or removal of user accounts or roles, depending on database privileges.
  • Escalation to full application compromise if session data, password hashes, or API keys are stored in the database and subsequently abused.
  • Potential impact on database availability through destructive queries (e.g., dropping tables) if the database user is over-privileged.

General mitigation guidance

Effective mitigation centers on eliminating dynamic SQL string construction with untrusted input and enforcing strict separation between query structure and data.

Patterns that are commonly used include:

  • Refactoring all database access in objects/category.php (and similar modules) to use prepared statements with bound parameters for all variables, including titles and IDs.
  • Centralizing database query construction in a small, well-reviewed data access layer that exposes only parameterized operations.
  • Applying strict server-side validation and normalization for category titles: enforcing length limits, allowed character sets, and rejecting unexpected patterns before interacting with the database.
  • Operating the database under a least-privilege model so that the application account has only the minimum necessary permissions, limiting the blast radius if an injection path appears elsewhere.
  • Favoring secure-by-default database access APIs or ORM layers that encourage or enforce parameterization rather than raw string concatenation.

How teams detect issues like this

Identifying and monitoring for this kind of vulnerability typically involves a combination of code-centric and behavior-centric approaches:

  • Static analysis: Configure SAST rules to flag SQL queries built via string concatenation, interpolation, or formatting functions where variables derived from HTTP requests or form data are used directly.
  • Code review: During manual review, pay close attention to data access functions, especially helpers such as fixCleanTitle(), and look for patterns that build queries with . concatenation or unescaped variables.
  • Security unit tests: Add automated tests that submit crafted category titles and verify that the underlying query layer rejects unexpected control characters or fails safely rather than executing injected logic.
  • Runtime monitoring: Use database or application logging to detect anomalous queries (e.g., unexpected UNION, OR 1=1, or subselects) associated with category operations, and configure alerting on suspicious patterns.

Sources

SourceLink
github.comgithub.com/WWBN/AVideo/commit/994cc2b3d802b819e07e6088338e8bf4e484aae4
github.comgithub.com/WWBN/AVideo/security/advisories/GHSA-584p-rpvq-35vf

Frequently asked

questions

Exploitability depends on who can create or rename categories and how those operations are exposed. If untrusted or low-privileged users can influence category titles through the web interface or APIs, the issue can be exploited with only application-level access.

No. The attacker only needs a way to supply crafted category titles or related input that flows into fixCleanTitle(). The vulnerable code constructs and executes the SQL on the server side; the attacker interacts through normal application endpoints.

The safest pattern is to replace all dynamic SQL string concatenation with prepared statements and bound parameters, coupled with strict server-side validation for category titles and IDs. Query structure should be static, with user input treated purely as data.

Adopt a consistent data access strategy that mandates parameterized queries or ORM abstractions, enforce secure coding guidelines and static analysis checks in CI, and keep user-controlled data out of query construction logic. Regular code reviews focused on input handling and query building further reduce the chance of reintroducing this class of bug.

Find out what's already
exploitable in your codebase.