CVE-2014-0177: Hub Package Arbitrary File Overwrite
4.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.34462%
CWE
Published
2/15/2022
Updated
11/8/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/github/hub | go | < 1.12.1 | 1.12.1 |
hub | rubygems | < 1.12.1 | 1.12.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two key functions:
- The
am
function inlib/hub/commands.rb
directly handled temporary file creation using predictable names viaFile.join(tmp_dir, patch_name)
, making symlink attacks possible. - The
tmp_dir
function inlib/hub/context.rb
enforced use of insecure default directories like/tmp
. The patch removedtmp_dir
and replaced the file creation withTempfile.new
, which uses secure, non-predictable filenames. Both functions were explicitly modified in the security fix commit, confirming their role in the vulnerability.