August 14, 2017 By Larry Loeb 2 min read

Researchers recently found that three of the most popular version control systems can be tricked into running arbitrary code.

Joern Schneeweisz, a security researcher for Recurity Labs, discovered vulnerabilities that could enable threat actors to steal source code from the code repository or hijack the machine that runs the repository by copying a source code project via a SSH link. This link can be hidden inside modules of the tool so that no direct user action is required to exploit the fault.

Inside the Git LFS Vulnerability

The first vulnerability, which can be configured by a .lfsconfig file, was found in Git LFS, a tool used on GitHub to clone repository files. If a URL in a submodule contains “ssh://-oProxyCommand=some-command,” instead of obtaining a clone, Git LFS would perform the command on the user’s computer. Calling this URL recursively could execute multiple commands. The payload is triggered when the module is updated.

This vulnerability also showed up in the GitLab implementation and was tracked with CVE-2017-12426. Additionally, Schneeweisz discovered that the parent Git project was open to the flaw as well.

Two Additional Vulnerabilities in Version Control Systems

After being informed of the problem, Git issued a fix. However, it seems that there were other version control systems affected by the same vulnerability, which was buried inside the Git clone operation. Bleeping Computer noted that during the attempt to fix Git LFS, Apache Subversion (SVN) and Mercurial were also found to be open to this kind of attack.

Schneeweisz noted that SVN was impacted most because it follows HTTP 301 redirects to svn+ssh:// URLs. “As a result,” he said, “an innocent-looking HTTP URL can be used to trigger a command execution with a 301 redirect.” That means that SVN doesn’t detect HTTP redirects in its repository cloning operations.

However, the issued fix addressed all the problem areas that have been found thus far in all three tools. Users of these systems should be vigilant about patching systems to avoid exploits.

More from

Hive0137 and AI-supplemented malware distribution

12 min read - IBM X-Force tracks dozens of threat actor groups. One group in particular, tracked by X-Force as Hive0137, has been a highly active malware distributor since at least October 2023. Nominated by X-Force as having the “Most Complex Infection Chain” in a campaign in 2023, Hive0137 campaigns deliver DarkGate, NetSupport, T34-Loader and Pikabot malware payloads, some of which are likely used for initial access in ransomware attacks. The crypters used in the infection chains also suggest a close relationship with former…

Unveiling the latest banking trojan threats in LATAM

9 min read - This post was made possible through the research contributions of Amir Gendler.In our most recent research in the Latin American (LATAM) region, we at IBM Security Lab have observed a surge in campaigns linked with malicious Chrome extensions. These campaigns primarily target Latin America, with a particular emphasis on its financial institutions.In this blog post, we’ll shed light on the group responsible for disseminating this campaign. We’ll delve into the method of web injects and Man in the Browser, and…

Crisis communication: What NOT to do

4 min read - Read the 1st blog in this series, Cybersecurity crisis communication: What to doWhen an organization experiences a cyberattack, tensions are high, customers are concerned and the business is typically not operating at full capacity. Every move you make at this point makes a difference to your company’s future, and even a seemingly small mistake can cause permanent reputational damage.Because of the stress and many moving parts that are involved, businesses often fall short when it comes to communication in a crisis.…

Topic updates

Get email updates and stay ahead of the latest threats to the security landscape, thought leadership and research.
Subscribe today