CVE-2022-46959: Path Traversal in github.com/go-sonic/sonic
Summary
CVE-2022-46959: Path Traversal in github.com/go-sonic/sonic. Affects github.com/go-sonic/sonic versions < 1.0.5. Fixed in 1.0.5. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The package github.com/go-sonic/sonic is written in Go and is part of the Sonic project. Sonic is a fast, lightweight, and schema-less search backend. It provides a simple API for indexing and querying data. The package is widely used in various applications that require efficient search functionality. However, a vulnerability has been discovered in the component /admin/backups/work-dir of Sonic v1.0.4.
Vulnerability Detail
The vulnerability in Sonic v1.0.4 allows attackers to execute a directory traversal attack. By exploiting this issue, an attacker can bypass the intended restrictions and access files outside of the intended directory. This can lead to unauthorized access to sensitive information or the execution of arbitrary code. The vulnerability has a CVSS score of 4.3, indicating a moderate severity level.
How To Fix
Latest published version: v1.1.4 as of 23 Oct 2026
go get github.com/go-sonic/sonic@v1.1.4
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.0.5
This is the first release that contains the fix.
go get github.com/go-sonic/sonic@v1.0.5
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading to Sonic v1.0.5 is not immediately feasible, a temporary workaround is to restrict access to the /admin/backups/work-dir component from untrusted sources. This can be achieved by implementing proper access controls or firewall rules to block unauthorized requests to the vulnerable component.
Conclusion
In conclusion, the vulnerability in the component /admin/backups/work-dir of Sonic v1.0.4 allows attackers to execute a directory traversal attack. To mitigate this vulnerability, it is recommended to upgrade to Sonic v1.0.5 or later. If immediate upgrade is not possible, restrict access to the vulnerable component from untrusted sources. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for github.com/go-sonic/sonic →
FAQ
The vulnerability allows attackers to access files outside of the intended directory, potentially leading to unauthorized access to sensitive information or the execution of arbitrary code.
At the time of this advisory, there are no known public exploits specifically targeting this vulnerability.
No, only Sonic v1.0.4 is affected. Upgrading to Sonic v1.0.5 or later resolves the vulnerability.
Yes, the CVSS score for this vulnerability is 4.3, indicating a moderate severity level.
For more information about this vulnerability, you can refer to the GitHub Advisory Database entry at https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/01/GHSA-2x48-p6cq-5xcw/GHSA-2x48-p6cq-5xcw.json