<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:* - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/cpes/cpe2.3agitpython_projectgitpythonpython/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 25 Aug 2026 04:05:22 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/cpes/cpe2.3agitpython_projectgitpythonpython/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>Remote Code Execution in GitPython via Git Config Injection</title><link>https://feed.craftedsignal.io/briefs/2026-08-gitpython-rce/</link><pubDate>Tue, 25 Aug 2026 04:05:22 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-08-gitpython-rce/</guid><description>GitPython versions before 3.1.59 contain a vulnerability where improper sanitization of multi-line configuration values allows attackers to inject arbitrary git directives, leading to remote code execution.</description><content:encoded><![CDATA[<p>GitPython is a Python library used to interact with Git repositories. A critical vulnerability (CVE-2026-78676) exists in versions prior to 3.1.59 due to improper re-serialization of multi-line configuration values during git-config write operations. An attacker can supply a specially crafted configuration value containing embedded newlines. When GitPython performs a write operation on the configuration file, these newlines cause the injected content to be interpreted as new, live git configuration directives. A primary vector involves the injection of a malicious <code>core.hooksPath</code>, which directs Git to execute arbitrary code from a location controlled by the attacker whenever a Git hook is triggered. This vulnerability enables unauthenticated remote code execution in environments where GitPython processes untrusted configuration data.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker provides a malicious, multi-line string intended to be written to a <code>.git/config</code> file (e.g., through an application interface using GitPython).</li>
<li>The application uses the vulnerable GitPython library to update the repository configuration with the attacker-controlled input.</li>
<li>GitPython fails to escape or neutralize the newline characters within the input string during the serialization process.</li>
<li>The serialized output is written to the <code>.git/config</code> file, effectively terminating the intended configuration key and starting a new directive on the subsequent line.</li>
<li>The injected directive, such as <code>core.hooksPath = /tmp/malicious_hooks_dir</code>, is successfully written into the configuration file.</li>
<li>The system or user triggers a standard Git operation (e.g., <code>git commit</code> or <code>git push</code>) within the repository.</li>
<li>Git reads the corrupted configuration file and executes the malicious scripts located in the attacker-specified hooks directory.</li>
<li>Final objective achieved: Remote code execution under the context of the user running the Git operation.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The vulnerability carries a CVSS score of 9.8, indicating a critical risk of complete system compromise. Successful exploitation allows for unauthenticated remote code execution, which can lead to data exfiltration, unauthorized access to internal development environments, and the deployment of persistent backdoors within software supply chains. Any system or automated pipeline utilizing GitPython to manage repository configurations with untrusted input is at risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>GitPython</code> library to version 3.1.59 or later immediately to address CVE-2026-78676.</li>
<li>Audit application code that passes user-supplied input to GitPython's configuration write functions.</li>
<li>Implement strict input validation to ensure configuration values do not contain newline characters or unexpected git directives.</li>
<li>Review logs for unauthorized modifications to <code>.git/config</code> files within critical infrastructure or CI/CD environments.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>vulnerability</category><category>path-traversal</category><category>gitpython</category><category>supply-chain</category><category>info-disclosure</category><category>local-file-inclusion</category></item></channel></rss>