Summary
Wavelog's OQRS log search concatenates the submitted callsign into a SQL query without parameter binding, creating an unauthenticated SQL injection risk. A remote attacker could read sensitive database records and may be able to take over accounts by obtaining password reset tokens.
Affected context
The issue occurs in Wavelog's OQRS search flow: the callsign submitted to POST /oqrs/search_log is passed from the controller to the model, where it is incorporated into a raw SQL WHERE clause. Deployments are at risk when this value is handled without parameter binding, allowing an unauthenticated request to influence the query. The affected component is described as fixed in version 2.5.
Exploit preconditions
- Attack surface: The remotely accessible OQRS search endpoint
- Required access: No authentication is required
- Trigger point: Processing the callsign parameter in the search request
- Why exploitation is possible: The parameter is concatenated into a SQL clause rather than supplied as a bound value
Why this happens
The application builds a database query by combining SQL syntax with a value from an HTTP request. Without parameterized queries or equivalent safe handling, input can alter the intended query structure. This is CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Potential impact
- An attacker could read arbitrary application database records, including account data, password hashes, API keys, station credentials, reset tokens, QSO data, and station metadata.
- Disclosure of reset tokens may enable account takeover, potentially including administrator accounts.
- Exposed credentials or API keys could enable further access to related systems.
General mitigation guidance
Defensive patterns for this class of issue include:
- Use parameterized queries or prepared statements for all database operations involving request data.
- Treat callsigns and other external values as untrusted, and apply validation appropriate to the expected format as a supplementary control.
- Avoid exposing sensitive records through search results, and limit database account permissions to the minimum required.
- Protect reset tokens and credentials, and provide a process to invalidate potentially exposed secrets.
How teams detect issues like this
- Use static analysis to identify SQL query construction that concatenates or interpolates request-derived values.
- Review database access code for raw query strings, especially in controller-to-model search flows.
- Enforce code review or CI policies that require parameter binding for queries using external input.
- Monitor database and application logs for unusual search requests or unexpected query behavior, while avoiding logging sensitive values.

