{"id":18602,"date":"2017-08-11T14:28:09","date_gmt":"2017-08-11T18:28:09","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=18602"},"modified":"2017-08-11T14:32:46","modified_gmt":"2017-08-11T18:32:46","slug":"version-control-ssh-url-shell-injection-vulnerability","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2017\/08\/11\/version-control-ssh-url-shell-injection-vulnerability\/","title":{"rendered":"Version Control ssh:\/\/ URL Shell Injection Vulnerability"},"content":{"rendered":"<p><a href=\"http:\/\/marc.info\/?l=git&amp;m=150238802328673&amp;w=2\">Junio C Hamano<\/a> (via <a href=\"https:\/\/twitter.com\/wincent\/status\/895786295531716608\">Greg Hurrell<\/a>):<\/p>\n<blockquote cite=\"http:\/\/marc.info\/?l=git&amp;m=150238802328673&amp;w=2\"><p>These contain a security fix for CVE-2017-1000117, and are released\nin coordination with Subversion and Mercurial that share a similar\nissue.<\/p><p>[&#8230;]<\/p><p>A malicious third-party can give a crafted &ldquo;ssh:\/\/&#8230;&rdquo; URL to an\nunsuspecting victim, and an attempt to visit the URL can result in\nany program that exists on the victim&rsquo;s machine being executed.\nSuch a URL could be placed in the .gitmodules file of a malicious\nproject, and an unsuspecting victim could be tricked into running\n&rdquo;git clone --recurse-submodules&rdquo; to trigger the vulnerability.<\/p><p>[&#8230;]<\/p><p>A &ldquo;ssh:\/\/&#8230;&rdquo; URL can result in a &ldquo;ssh&rdquo; command line with a\n   hostname that begins with a dash &ldquo;-&rdquo;, which would cause the &ldquo;ssh&rdquo;\n   command to instead (mis)treat it as an option.<\/p><p>[&#8230;]<\/p><p>In the same spirit, a repository name that begins with a dash &ldquo;-&rdquo;\n   is also forbidden now.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Junio C Hamano (via Greg Hurrell): These contain a security fix for CVE-2017-1000117, and are released in coordination with Subversion and Mercurial that share a similar issue.[&#8230;]A malicious third-party can give a crafted &ldquo;ssh:\/\/&#8230;&rdquo; URL to an unsuspecting victim, and an attempt to visit the URL can result in any program that exists on the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[131,377,30,1381,378,48,506,869,376],"class_list":["post-18602","post","type-post","status-publish","format-standard","hentry","category-technology","tag-bug","tag-git","tag-mac","tag-macos-10-12","tag-mercurial","tag-security","tag-ssh","tag-subversion","tag-versioncontrol"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=18602"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18602\/revisions"}],"predecessor-version":[{"id":18603,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18602\/revisions\/18603"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=18602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=18602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=18602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}