CVE-2022-46959: Path Traversal in github.com/go-sonic/sonic

github.com/go-sonic/sonic Updated 02 Oct 2025

Summary

23/01/2023
Yes i
Moderate
4.3

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback