SQL Injection in sails-mysqlGHSA-hx5x-49mm-vmhw
HIGHGHSA-hx5x-49mm-vmhw is a high-severity (CVSS 7.5) vulnerability in sails-mysql. A fix is available for sails-mysql — see the affected versions and patch details below.
Real-World Exposure
sails-mysqlReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
Versions of sails-mysql prior to 0.10.8 are vulnerable to SQL Injection. The sort keyword is not properly sanitized and may allow attackers to inject SQL statements and execute arbitrary SQL queries
Recommendation
Upgrade to version 0.10.8 or later.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | sails-mysql | all versions | 0.10.8npm install sails-mysql@0.10.8 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for sails-mysql, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update sails-mysql to 0.10.8 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hx5x-49mm-vmhw is resolved across your whole dependency graph.
Workarounds
Until you can upgrade, make sure every query built from user input uses parameterised statements or a prepared-statement API rather than string concatenation, and reduce the database account's privileges so an injected query cannot read or alter data beyond what the feature needs.
Frequently Asked Questions
Is GHSA-hx5x-49mm-vmhw in your dependencies?
Find it across npm, including transitive dependencies.