| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| devcode-it/openstamanager | composer | <= 2.9.4 | 2.9.5 |
The vulnerability exists within the retrieve method of the Manager class, located in src/API/Manager.php. The core issue is that user-controlled input from the display parameter is used to construct a raw SQL query via selectRaw() without proper sanitization. An attacker can provide malicious SQL expressions within the display parameter, which the database will then execute. The provided patch addresses this by introducing a validation step. It retrieves the legitimate column names for the target table and filters the input from the display parameter against this allow-list using array_intersect. This ensures that only valid column names are included in the SELECT clause, effectively neutralizing the SQL injection vector. The commit message 'fix: sanitized variables from apis to prevent sql injection' and the code changes directly confirm this analysis.
A Semantic Attack on Google Gemini - Read the Latest Research