{"id":15756,"date":"2025-04-01T20:44:26","date_gmt":"2025-04-01T20:44:26","guid":{"rendered":""},"modified":"2025-06-14T07:02:36","modified_gmt":"2025-06-14T13:02:36","slug":"cve-2023-49569-critical-path-traversal-vulnerability-in-go-git-leading-to-potential-remote-code-execution","status":"publish","type":"post","link":"https:\/\/www.ameeba.com\/blog\/cve-2023-49569-critical-path-traversal-vulnerability-in-go-git-leading-to-potential-remote-code-execution\/","title":{"rendered":"CVE-2023-49569: Critical Path Traversal Vulnerability in go-git Leading to Potential Remote Code Execution"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p>CVE-2023-49569 is a critical path traversal vulnerability discovered in go-git, a pure Go implementation of Git. This vulnerability allows attackers to create or modify files across the filesystem, potentially leading to remote code execution (RCE) in applications using go-git under specific configurations.\u200b<\/p>\n\n\n\n<p>The issue arises when applications utilize the <code class=\"\" data-line=\"\">ChrootOS<\/code> filesystem, which is the default when using &#8220;Plain&#8221; versions of the <code class=\"\" data-line=\"\">Open<\/code> and <code class=\"\" data-line=\"\">Clone<\/code> functions (e.g., <code class=\"\" data-line=\"\">PlainClone<\/code>). Applications using <code class=\"\" data-line=\"\">BoundOS<\/code> or in-memory filesystems are not affected. Notably, this <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-2567-a-high-risk-vulnerability-impacting-atg-monitoring-systems\/\"  data-wpil-monitor-id=\"35503\">vulnerability does not impact<\/a> the upstream Git CLI.\u200b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Vulnerability Summary<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Field<\/th><th>Detail<\/th><\/tr><\/thead><tbody><tr><td><strong>CVE ID<\/strong><\/td><td>CVE-2023-49569<\/td><\/tr><tr><td><strong>Severity<\/strong><\/td><td>Critical (CVSS v3.1 Score: 9.8)<\/td><\/tr><tr><td><strong>Attack Vector<\/strong><\/td><td>Network<\/td><\/tr><tr><td><strong>Privileges Required<\/strong><\/td><td>None<\/td><\/tr><tr><td><strong>User Interaction<\/strong><\/td><td>None<\/td><\/tr><tr><td><strong>Impact<\/strong><\/td><td><a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-29017-remote-code-execution-in-code-astro-internet-banking-system-2-0-0\/\"  data-wpil-monitor-id=\"32830\">Remote Code Execution<\/a><\/td><\/tr><tr><td><strong>Affected Component<\/strong><\/td><td>go-git (ChrootOS filesystem)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Affected Products<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Product<\/th><th>Affected Versions<\/th><\/tr><\/thead><tbody><tr><td>go-git<\/td><td>v4.0.0 to v5.10.x<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Applications using go-git with the default <code class=\"\" data-line=\"\">ChrootOS<\/code> filesystem are susceptible. Those using <code class=\"\" data-line=\"\">BoundOS<\/code> or in-memory filesystems are not affected.\u200b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How the Exploit Works<\/h2>\n\n\n\n<p>The vulnerability stems from improper <a class=\"wpil_keyword_link\" href=\"https:\/\/www.ameeba.com\"   title=\"sanitization\" data-wpil-keyword-link=\"linked\"  data-wpil-monitor-id=\"31387\">sanitization<\/a> of file paths in go-git&#8217;s <code class=\"\" data-line=\"\">ChrootOS<\/code> filesystem. An attacker can craft malicious Git server responses containing <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-32629-critical-path-traversal-vulnerability-in-wp-businessdirectory-plugin\/\"  data-wpil-monitor-id=\"32934\">path traversal<\/a> sequences (e.g., <code class=\"\" data-line=\"\">..\/<\/code>) to write files outside the intended directory.\u200b<\/p>\n\n\n\n<p>In the worst-case scenario, this could allow an attacker to overwrite critical system files or place malicious executables, leading to <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2023-43514-memory-corruption-vulnerability-leading-to-potential-system-compromise\/\"  data-wpil-monitor-id=\"31558\">remote code execution<\/a> when these files are executed by the system or application.\u200b<\/p><div id=\"ameeb-3075383852\" class=\"ameeb-content-2 ameeb-entity-placement\"><div style=\"border-left: 4px solid #555; padding-left: 20px; margin: 48px 0; font-family: Roboto, sans-serif; color: #ffffff; line-height: 1.6; max-width: 700px;\">\r\n  <h2 style=\"margin-top: 0; font-size: 20px; font-weight: 600; display: flex; align-items: center;\">\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\" style=\"display: inline-flex; align-items: center; margin-right: 8px;\">\r\n      <img decoding=\"async\" src=\"https:\/\/www.ameeba.com\/blog\/wp-content\/uploads\/2025\/10\/Best-App-icon-Ameeba.png\" alt=\"Ameeba Chat Icon\" style=\"width: 40px; height: 40px;\" \/>\r\n    <\/a>\r\n    A new way to communicate\r\n  <\/h2>\r\n\r\n  <p style=\"margin-bottom: 12px;\">\r\n    Ameeba Chat is built on encrypted identity, not personal profiles.\r\n  <\/p>\r\n\r\n  <p style=\"margin-bottom: 16px;\">\r\n    Message, call, share files, and coordinate with identities kept separate.\r\n  <\/p>\r\n\r\n  <ul style=\"list-style: none; padding-left: 0; margin-bottom: 20px;\">\r\n    <li>\u2022 Encrypted identity<\/li>\r\n    <li>\u2022 Ameeba Chat authenticates access<\/li>\r\n    <li>\u2022 Aliases and categories<\/li>\r\n    <li>\u2022 End-to-end encrypted chat, calls, and files<\/li>\r\n    <li>\u2022 Secure notes for sensitive information<\/li>\r\n  <\/ul>\r\n\r\n  <p style=\"font-style: italic; font-weight: 600; margin-bottom: 24px;\">\r\n    Private communication, rethought.\r\n  <\/p>\r\n\r\n  <div style=\"display: flex; flex-wrap: wrap; gap: 12px;\">\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\/download\" style=\"background-color: #ffffff; color: #000000; padding: 10px 20px; text-decoration: none; border-radius: 6px; font-weight: 500;\">Download Ameeba Chat<\/a>\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\" style=\"border: 1px solid #ffffff; color: #ffffff; padding: 10px 20px; text-decoration: none; border-radius: 6px; font-weight: 500;\">Learn More<\/a>\r\n  <\/div>\r\n<\/div>\r\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conceptual Exploit Example<\/h2>\n\n\n\n<p>An attacker sets up a malicious Git server that, during a clone operation, responds with crafted <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-32631-path-traversal-vulnerability-in-oxygen-mydata-for-woocommerce\/\"  data-wpil-monitor-id=\"32942\">paths designed to traverse<\/a> directories.\u200b<\/p>\n\n\n\n<p>For instance, a malicious <code class=\"\" data-line=\"\">.git<\/code> repository could contain a <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-39470-path-traversal-vulnerability-in-thimpress-ivy-school-leading-to-php-local-file-inclusion\/\"  data-wpil-monitor-id=\"40885\">file with a path<\/a> like:\u200b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bashCopyEdit<code class=\"\" data-line=\"\">\n..\/..\/..\/..\/..\/..\/etc\/cron.d\/malicious_job\n<\/code><\/pre>\n\n\n\n<p>When an application using go-git with <code class=\"\" data-line=\"\">ChrootOS<\/code> clones this repository, it <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-1883-out-of-bounds-write-vulnerability-in-solidworks-edrawings-obj-file-reading-procedure\/\"  data-wpil-monitor-id=\"58191\">writes the file<\/a> to <code class=\"\" data-line=\"\">\/etc\/cron.d\/malicious_job<\/code>, potentially scheduling a malicious cron job.\u200b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Recommendations for Mitigation<\/h2>\n\n\n\n<p>To mitigate the risks associated with CVE-2023-49569:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Upgrade go-git: Update to version v5.11.0 or later, where this vulnerability has been addressed.\u200b<\/li>\n\n\n\n<li><strong>Use Safer Filesystems<\/strong>: If upgrading is not immediately feasible, consider switching from <code class=\"\" data-line=\"\">ChrootOS<\/code> to <code class=\"\" data-line=\"\">BoundOS<\/code> or an in-memory filesystem, which are not affected by this issue.\u200b<\/li>\n\n\n\n<li><strong>Restrict Git <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-24522-unauthenticated-remote-access-to-node-red-server-in-kunbus-revolution-pi-os-bookworm\/\"  data-wpil-monitor-id=\"42784\">Server Access<\/a><\/strong>: Limit cloning operations to trusted Git servers to reduce exposure to malicious repositories.\u200b<\/li>\n\n\n\n<li><strong>Validate Repository Contents<\/strong>: Implement additional checks to validate <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-32202-unrestricted-file-upload-vulnerability-in-brian-batt-s-insert-or-embed-articulate-content-into-wordpress\/\"  data-wpil-monitor-id=\"31980\">file paths and contents<\/a> when cloning repositories, ensuring they do not escape intended directories.\u200b<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Timeline and Response<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Reported<\/strong>: January 9, 2024\u200b<\/li>\n\n\n\n<li><strong>Patched Release<\/strong>: go-git v5.11.0\u200b<\/li>\n\n\n\n<li><strong>Public Disclosure<\/strong>: January 12, 2024\u200b<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Closing Thoughts<\/h2>\n\n\n\n<p>CVE-2023-49569 highlights the importance of proper <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-30391-microsoft-dynamics-input-validation-vulnerability-leading-to-unauthorized-information-disclosure\/\"  data-wpil-monitor-id=\"42589\">input validation<\/a> and filesystem handling in applications interacting with external sources. Developers using go-git should promptly update to the latest version and review their usage of filesystem abstractions to ensure security best practices are followed.<\/p><div id=\"ameeb-231868314\" class=\"ameeb-content ameeb-entity-placement\"><div class=\"poptin-embedded\" data-id=\"f6b387694f681\"><\/div>\r\n\r\n\r\n\r\n\r\n\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview CVE-2023-49569 is a critical path traversal vulnerability discovered in go-git, a pure Go implementation of Git. This vulnerability allows attackers to create or modify files across the filesystem, potentially leading to remote code execution (RCE) in applications using go-git under specific configurations.\u200b The issue arises when applications utilize the ChrootOS filesystem, which is the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"footnotes":""},"categories":[1],"tags":[],"vendor":[],"product":[],"attack_vector":[85,80],"asset_type":[],"severity":[],"exploit_status":[],"class_list":["post-15756","post","type-post","status-publish","format-standard","hentry","category-uncategorized","attack_vector-directory-traversal","attack_vector-rce"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/15756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/comments?post=15756"}],"version-history":[{"count":23,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/15756\/revisions"}],"predecessor-version":[{"id":51927,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/15756\/revisions\/51927"}],"wp:attachment":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/media?parent=15756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/categories?post=15756"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/tags?post=15756"},{"taxonomy":"vendor","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/vendor?post=15756"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/product?post=15756"},{"taxonomy":"attack_vector","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/attack_vector?post=15756"},{"taxonomy":"asset_type","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/asset_type?post=15756"},{"taxonomy":"severity","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/severity?post=15756"},{"taxonomy":"exploit_status","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/exploit_status?post=15756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}