Summary
WWBN AVideo contains an unauthenticated SQL injection flaw in the getAllCategories() method of objects/category.php, where the doNotShowCats request parameter is concatenated into SQL with only superficial sanitization.
An attacker who can send crafted HTTP requests to the AVideo instance may manipulate SQL query structure, potentially leading to data exfiltration, modification, or full compromise of the underlying database.
Affected context
The vulnerability occurs in WWBN AVideo deployments where:
- The
getAllCategories()method inobjects/category.phpis reachable over the network - The
doNotShowCatsrequest parameter is accepted and incorporated into database queries - Input is sanitized only by stripping single quotes and is not protected by the global filters in
objects/security.php
In such contexts, typical user-supplied input can directly influence SQL query structure without robust validation or parameterization.
Exploit preconditions
- Attack surface: Public-facing HTTP endpoints that invoke
getAllCategories()inobjects/category.php - Required access: No authentication required; any network client that can reach the AVideo web interface may attempt exploitation
- Trigger point: Supplying crafted values in the
doNotShowCatsparameter, causing the backend to build and execute a manipulated SQL query - Why exploitation is possible: The parameter is concatenated into SQL with only
str_replace("'", '', ...)sanitization, leaving other metacharacters and escape sequences intact, which allows the attacker to alter SQL string boundaries and query logic
Why this happens
The root cause aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Instead of using parameterized queries or prepared statements, the application directly interpolates the doNotShowCats value into SQL and attempts to "sanitize" it by removing single quotes.
This pattern treats user input as trusted and assumes that removing one character class is sufficient, ignoring other control characters and database-specific escape mechanisms.
Because the application does not employ robust input binding or a centralized filtering mechanism on this parameter, an attacker can inject additional SQL syntax through crafted values.
Potential impact
- Retrieval of sensitive information from arbitrary database tables, including user records
- Modification or deletion of content, categories, or other application data
- Creation of new privileged accounts or alteration of authentication data
- Potential escalation to remote code execution, depending on database and platform configuration
- Disruption of service availability through destructive queries
General mitigation guidance
Effective mitigation generally focuses on eliminating direct string concatenation of user input into SQL and reducing trust in request parameters:
- Prefer parameterized queries or prepared statements for all database access, binding
doNotShowCatsas a typed parameter rather than interpolating it into SQL - Apply strict server-side validation and normalization for category-related parameters, restricting them to expected formats (e.g., numeric IDs or vetted lists)
- Centralize input handling so that all externally-supplied values pass through a common validation and encoding layer, rather than ad-hoc string replacements
- Implement least-privilege database accounts, ensuring the application user has only the minimal privileges necessary for its operations
- Consider query-building abstractions or ORM layers that default to safe parameterization patterns and make raw SQL usage explicit and rare
How teams detect issues like this
Organizations can detect and monitor for this class of vulnerability using several approaches:
- Static analysis: Configure rules to flag dynamic SQL constructed with concatenated request parameters, particularly in
categoryor listing logic - Code review: Look for usages of
$_GET,$_POST, or similar superglobals being directly embedded into SQL strings, or "sanitization" that relies on simple character stripping - Centralized policies: Enforce development guidelines that require parameterized queries and prohibit ad-hoc sanitization routines for SQL safety
- Runtime monitoring: Use database activity monitoring or WAF rules to identify anomalous SQL patterns, such as stacked queries or unexpected operators in category-related queries

