Summary
WWBN AVideo contains an unauthenticated SQL injection vulnerability in the objects/videos.json.php and objects/video.php endpoints, where the catName parameter from JSON POST bodies is not properly sanitized.
Because JSON input is merged into $_REQUEST after global security checks, an attacker can inject arbitrary SQL through catName and potentially fully compromise the application's database.
Affected context
The vulnerability appears in WWBN AVideo deployments that:
- Expose the objects/videos.json.php and objects/video.php endpoints over HTTP(S)
- Accept JSON-formatted POST request bodies with a catName field
- Rely on global request sanitization that executes before JSON data is merged into $_REQUEST
In these conditions, the catName parameter supplied in JSON is not subjected to the expected input filtering, leaving underlying SQL queries exposed to injection.
Exploit preconditions
- Attack surface: Public-facing web endpoints: objects/videos.json.php and objects/video.php
- Required access: None; the issue is exploitable by unauthenticated remote clients
- Input vector: JSON-formatted POST request body containing a crafted catName value
- Trigger point: Server-side processing that reads catName from $_REQUEST (or equivalent) and interpolates it into SQL statements
- Why exploitation is possible: JSON body parameters are parsed and merged into $_REQUEST after the global security checks run, so catName bypasses the intended sanitization and can reach SQL construction logic without proper validation or parameterization.
Why this happens
This vulnerability results from constructing SQL queries with untrusted input that is not consistently sanitized or bound as parameters.
Specifically, the request-handling flow treats JSON body parameters differently from other request sources: JSON data is merged into the general request array after centralized security filters run, leaving catName unsanitized.
Application code then incorporates catName directly into SQL commands, either through string concatenation or unsafe interpolation, matching CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
The core design flaw is relying on global sanitization instead of using prepared statements and binding user input as typed parameters at query construction time.
Potential impact
- Remote attackers may extract sensitive data from the application's database, including user records and configuration data.
- Attackers could modify or delete video metadata, category data, or other application content stored in the database.
- In some deployments, SQL injection might enable creation of new administrative accounts or privilege escalation within the application.
- Depending on the database and environment configuration, SQL injection may be chained into remote code execution on the underlying server.
- Persistent integrity damage to the video platform's data, including defacement, data corruption, or loss of availability.
General mitigation guidance
Effective mitigation focuses on eliminating direct use of untrusted input in SQL construction and normalizing how all request data is processed:
- Use parameterized queries or prepared statements for all database access, ensuring user input is bound as parameters rather than concatenated into SQL strings.
- Centralize query-building routines so that developers cannot bypass parameterization with ad hoc SQL fragments.
- Treat all request sources (GET, POST, JSON bodies, cookies, headers) as untrusted and subject them to uniform validation and encoding rules.
- Avoid relying solely on global sanitization filters; validate and constrain each parameter according to its expected type, allowed characters, and length at the point of use.
- Introduce strict input models for JSON payloads, rejecting unexpected fields and enforcing schema-based validation before data is passed to persistence layers.
- Apply least privilege to the database account used by the application, limiting the impact of any successful injection.
How teams detect issues like this
Detection typically combines code-level review, automated analysis, and runtime monitoring:
- Use static analysis tools configured with rules to flag SQL query construction that incorporates variables directly, especially where $_REQUEST, JSON-decoded arrays, or similar are involved.
- During code reviews, look for patterns where request parameters (including those from JSON) are merged into global arrays after security checks or are used in SQL strings without parameter binding.
- Implement secure coding guidelines that prohibit dynamic SQL concatenation and require prepared statements, with automated checks in CI to enforce these policies.
- Enable database and application logging of SQL queries and unusual error responses, then monitor for anomalous patterns such as queries containing typical injection metacharacters (e.g., unmatched quotes, comment markers).
- Consider dynamic application security testing (DAST) against relevant endpoints to identify exploitable injection vectors in pre-production environments.

