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

New Attack Targets Online Customer Service Channels

An unknown attacker group is targeting customer service agents at gambling and gaming companies with a new malware effort. Known as IceBreaker, the code is capable of stealing passwords and cookies, exfiltrating files, taking screenshots and running custom VBS scripts. While these are fairly standard functions, what sets IceBreaker apart is its infection vector. Malicious actors are leveraging the helpful nature of customer service agents to deliver their payload and drive the infection process. Here’s a look at how IceBreaker…

Operational Technology: The evolving threats that might shift regulatory policy

Listen to this podcast on Apple Podcasts, Spotify or wherever you find your favorite audio content. Attacks on Operational Technology (OT) and Industrial Control Systems (ICS) grabbed the headlines more often in 2022 — a direct result of Russia’s invasion of Ukraine sparking a growing willingness on behalf of criminals to target the ICS of critical infrastructure. Conversations about what could happen if these kinds of systems were compromised were once relegated to “what ifs” and disaster movie scripts. But those days are…

Cybersecurity 101: What is Attack Surface Management?

There were over 4,100 publicly disclosed data breaches in 2022, exposing about 22 billion records. Criminals can use stolen data for identity theft, financial fraud or to launch ransomware attacks. While these threats loom large on the horizon, attack surface management (ASM) seeks to combat them. ASM is a cybersecurity approach that continuously monitors an organization’s IT infrastructure to identify and remediate potential points of attack. Here’s how it can give your organization an edge. Understanding Attack Surface Management Here…

Six Ways to Secure Your Organization on a Smaller Budget

My LinkedIn feed has been filled with connections announcing they have been laid off and are looking for work. While it seems that no industry has been spared from uncertainty, my feed suggests tech has been hit the hardest. Headlines confirm my anecdotal experience. Many companies must now protect their systems from more sophisticated threats with fewer resources — both human and technical. Cobalt’s 2022 The State of Pentesting Report found that 90% of short-staffed teams are struggling to monitor…