CVE-2014-0177: Hub Package Arbitrary File Overwrite

github.com/github/hub Updated 02 Oct 2025

Summary

15/02/2022
Yes i
Moderate
4.4

CVE-2014-0177: Hub Package Arbitrary File Overwrite. Affects github.com/github/hub versions < 1.12.1. Fixed in 1.12.1. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The hub package is a command-line tool that provides a consistent interface to interact with GitHub repositories. It is written in Go and Ruby and is widely used by developers for managing their GitHub workflows. This vulnerability, identified as CVE-2014-0177, allows local users to overwrite arbitrary files by exploiting a symlink attack on a temporary patch file.

Vulnerability Detail

The vulnerability arises from the am function in the lib/hub/commands.rb file. This function does not properly handle temporary patch files, making it susceptible to symlink attacks. By creating a malicious symlink, an attacker can trick the am function into overwriting arbitrary files on the system. This could lead to unauthorized modifications, data loss, or even remote code execution if the overwritten file is executed by another process.

How To Fix

Minimum fixed version

1.12.1

This is the first release that contains the fix.

go get github.com/github/hub@v1.12.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating to the latest version is not immediately feasible, users can mitigate the risk by avoiding the use of the am function or by manually verifying the integrity of patch files before applying them. Additionally, users should ensure that they have appropriate file system permissions in place to prevent unauthorized file overwrites.

Conclusion

The vulnerability in the hub package allows local users to overwrite arbitrary files on the system through a symlink attack. To mitigate this risk, it is recommended to update to version 1.12.1 or later. If immediate updating is not possible, users should exercise caution when using the affected function and ensure proper file system permissions. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/github/hub →

Share this vulnerability

FAQ

This vulnerability allows local users to overwrite arbitrary files on the system, which can lead to unauthorized modifications, data loss, or potential remote code execution.

No, this vulnerability requires local access to the system in order to create the malicious symlinks and overwrite files.

There are no known instances of this vulnerability being exploited in the wild at this time.

Yes, the CVSS score for this vulnerability is 4.4, indicating a moderate severity.

How To Fix

Minimum fixed version

1.12.1

This is the first release that contains the fix.

go get github.com/github/hub@v1.12.1

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