Advisory

GHSA-rvxj-7f72-mhrx

Details, part 2 of 2. The advisory

Details

The script was executed against ther public demo to confirm exploitability in a production-like environment (read-only).
<img width="773" height="393" alt="image" src="https://github.com/user-attachments/assets/ae97ea37-21fa-4718-98f5-f7f9696f3c2e" />

Impact:
Attackers with low-privileged access can fully compromise the database. This allows for:

  • Confidentiality Loss: Reading sensitive data (e.g., password hashes, session tokens, personal contact details, configuration secrets).
  • Integrity Loss: Modifying or deleting arbitrary data within the application.
  • Availability Loss: Potential to drop tables or corrupt data.

Remediation
1. Input Validation (Whitelisting)
Do not rely solely on is_int() for security decisions when handling external input, especially JSON data where keys can be numeric strings. Implement a strict whitelist (allowlist) of allowed column names for filtering in Nextmatch widgets. If the key/column is not in the whitelist, reject the request.

2. Parameter Binding
Ensure all filter values are bound as parameters (prepared statements) rather than being concatenated directly into the SQL string.

3. Strict Type Checking
When processing JSON input, ensure that keys are strictly checked against expected types (e.g., using === for strict comparison or filter_var) before being used in SQL generation logic.

Credits

Reported by Łukasz Rybak

Sources & licences