Summary
AVideo through version 29.0 contains an unauthenticated SQL injection vulnerability in the User_Location plugin's region and city lookup endpoints. Attackers may manipulate GET parameters to read arbitrary database contents, including password hashes and other sensitive information, without logging in.
Affected context
The vulnerability occurs in AVideo deployments where the User_Location plugin exposes the regions.json.php and cities.json.php endpoints and passes the country or region GET parameters into database queries without sufficient protection. The risk is greatest when these endpoints are publicly reachable and the backing database contains sensitive application or user data.
Exploit preconditions
- Attack surface: Public HTTP endpoints provided by the User_Location plugin
- Required access: No authentication is generally required when the affected endpoints are exposed
- Trigger point: Processing of the
countryorregionGET parameters - Why exploitation is possible: User-controlled values are incorporated into SQL statements without effective parameter binding or equivalent safe query construction
Why this happens
The underlying bug is an injection-prone database query pattern. Input received from HTTP request parameters is treated as part of SQL syntax rather than as data, because the application does not consistently use prepared statements, parameter binding, or an equivalent safe abstraction.
This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'). When query structure and user-controlled values are not adequately separated, an attacker may influence database operations and retrieve information beyond the intended lookup results.
Potential impact
- Attackers may read arbitrary database records
- Password hashes and other sensitive user information could be disclosed
- Application data confidentiality may be reduced
- Exposed data could support account compromise or follow-on attacks
- Database integrity could be affected if additional query capabilities are available
General mitigation guidance
Mitigation generally centers on separating SQL instructions from user-supplied data and reducing unnecessary exposure of lookup functionality.
Common defensive patterns include:
- Use parameterized queries or prepared statements for every database operation
- Apply strict allowlist validation for country and region identifiers
- Prefer typed data-access APIs that do not construct SQL through string concatenation
- Return only the fields and records required by the endpoint
- Restrict database accounts to the minimum permissions needed by the application
- Avoid exposing administrative or sensitive database data through public lookup endpoints
- Apply authentication or access controls where public availability is not required
How teams detect issues like this
Organizations can look for this vulnerability class through:
- Static analysis rules that flag SQL string construction involving request parameters
- Code review checks for missing prepared statements or parameter binding
- Tests that verify endpoint inputs remain data rather than altering query behavior
- Web application firewall or API gateway policies monitoring anomalous database-oriented request patterns
- Database audit logs showing unusual query shapes, enumeration behavior, or unexpected access to sensitive tables
- Automated security review tools that identify injection-prone data-flow paths

