Authenticated users or holders of a share token can perform SQL injection by providing a specially crafted `prefix` field within the filter objects of the Reports API. The issue occurs because the `getFilterQuery()` function concatenates this input unquoted into Postgres WHERE clauses. This allows an attacker to send crafted filters to the '/api/reports/' endpoint to read or modify data belonging to other websites.