BillaBear's metric filter system directly interpolates user-controlled filter names into SQL queries using sprintf() without sanitization. While filter values are properly parameterized, filter names (column identifiers) are concatenated directly into SQL strings in EventRepository.php. An authenticated user with ROLE_ACCOUNT_MANAGER can inject malicious SQL through metric filter names, achieving full database compromise when usage calculations execute.
- Type: CWE-89 (SQL Injection)
- Affected Version:
2025.01.01,2025.01.02, and2025.01.03(latest GitHub release at time of disclosure; verified on2025.01.03) - Affected Component:
src/BillaBear/Repository/Usage/EventRepository.php - Attack Vector: Network (Remote)
- Authentication Required: Yes (ROLE_ACCOUNT_MANAGER or higher)