Moderate severityNVD Advisory· Published May 27, 2014· Updated May 6, 2026
CVE-2014-0177
CVE-2014-0177
Description
The am function in lib/hub/commands.rb in hub before 1.12.1 allows local users to overwrite arbitrary files via a symlink attack on a temporary patch file.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/github/hubGo | < 1.12.1 | 1.12.1 |
hubRubyGems | < 1.12.1 | 1.12.1 |
Affected products
1Patches
2016ec99d25b1Use non-predictable filename for downloaded patch file
2 files changed · +1 −5
lib/hub/commands.rb+1 −1 modified@@ -519,7 +519,7 @@ def am(args) end end - patch_file = File.join(tmp_dir, patch_name) + patch_file = Tempfile.new('patch_name') File.open(patch_file, 'w') { |file| file.write(patch) } args[idx] = patch_file end
lib/hub/context.rb+0 −4 modified@@ -556,10 +556,6 @@ def command?(name) !which(name).nil? end - def tmp_dir - ENV['TMPDIR'] || ENV['TEMP'] || '/tmp' - end - def terminal_width if unix? width = %x{stty size 2>#{NULL}}.split[1].to_i
016ec99d25b1Use non-predictable filename for downloaded patch file
2 files changed · +1 −5
lib/hub/commands.rb+1 −1 modified@@ -519,7 +519,7 @@ def am(args) end end - patch_file = File.join(tmp_dir, patch_name) + patch_file = Tempfile.new('patch_name') File.open(patch_file, 'w') { |file| file.write(patch) } args[idx] = patch_file end
lib/hub/context.rb+0 −4 modified@@ -556,10 +556,6 @@ def command?(name) !which(name).nil? end - def tmp_dir - ENV['TMPDIR'] || ENV['TEMP'] || '/tmp' - end - def terminal_width if unix? width = %x{stty size 2>#{NULL}}.split[1].to_i
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- github.com/github/hub/commit/016ec99d25b1cb83cb4367e541177aa431beb600nvdExploitPatchWEB
- github.com/advisories/GHSA-x5m6-jh4r-34mvghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2014-0177ghsaADVISORY
- secunia.com/advisories/58273nvdURL Repurposed
- github.com/mislav/hub/commit/016ec99d25b1cb83cb4367e541177aa431beb600ghsaWEB
- github.com/mislav/hub/releases/tag/v1.12.1ghsaWEB
- github.com/rubysec/ruby-advisory-db/blob/master/gems/hub/CVE-2014-0177.ymlghsaWEB
News mentions
0No linked articles in our index yet.