CVE-2014-125064 is a critical-severity (CVSS 9.8) vulnerability in github.com/elgs/gosqljson. A fix is available for github.com/elgs/gosqljson — see the affected versions and patch details below.
gosqljson SQL Injection vulnerability
Real-World Exposure
github.com/elgs/gosqljsonReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
A vulnerability, which was classified as critical, has been found in elgs gosqljson. This issue affects the function QueryDbToArray/QueryDbToMap/ExecDb of the file gosqljson.go. The manipulation of the argument sqlStatement leads to sql injection. The name of the patch is 2740b331546cb88eb61771df4c07d389e9f0363a. It is recommended to apply a patch to fix this issue. The associated identifier of this vulnerability is VDB-217631.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/elgs/gosqljson | all versions | 0.0.0-20220916234230-750f26ee23c7go get github.com/elgs/gosqljson@v0.0.0-20220916234230-750f26ee23c7 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/elgs/gosqljson, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/elgs/gosqljson to 0.0.0-20220916234230-750f26ee23c7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2014-125064 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 CVE-2014-125064 in your dependencies?
Find it across Go, including transitive dependencies.