<?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/"><channel><title>Datamodel-Code-Generator &lt; 0.70.0 - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/datamodel-code-generator--0.70.0/</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>Sun, 26 Jul 2026 05:17:52 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/datamodel-code-generator--0.70.0/feed.xml" rel="self" type="application/rss+xml"/><item><title>Code Injection Vulnerability in datamodel-code-generator (CVE-2026-63720)</title><link>https://feed.craftedsignal.io/briefs/2026-07-cve-2026-63720/</link><pubDate>Sun, 26 Jul 2026 05:17:52 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-cve-2026-63720/</guid><description>CVE-2026-63720 details a code injection vulnerability in datamodel-code-generator versions prior to 0.70.0, allowing attackers to achieve remote code execution by providing a malicious `customBasePath` value within input schemas that is unsafely embedded into a Python import statement.</description><content:encoded><![CDATA[<p>datamodel-code-generator, a Python tool for generating data model code, is affected by a code injection vulnerability, CVE-2026-63720, in versions prior to 0.70.0. This flaw allows an attacker to achieve remote code execution (RCE) by manipulating input schemas. Specifically, by supplying a crafted <code>customBasePath</code> value containing embedded newlines and a dot-free Python expression, the attacker can cause arbitrary Python code to be emitted verbatim into a <code>from ... import ...</code> statement within the generated module. When this compromised module is subsequently imported, the malicious Python code executes, posing a significant risk to systems that process untrusted schemas using this tool.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker prepares a malicious input schema designed for <code>datamodel-code-generator</code>.</li>
<li>Within this schema, the attacker embeds a specially crafted <code>customBasePath</code> value.</li>
<li>The <code>customBasePath</code> value includes embedded newline characters and a dot-free Python expression (e.g., <code>os.system('malicious_command')</code>).</li>
<li>A legitimate user or automated system processes this malicious input schema using <code>datamodel-code-generator</code> prior to version 0.70.0.</li>
<li>During the code generation process, the <code>datamodel-code-generator</code> tool insecurely embeds the malicious <code>customBasePath</code> verbatim into a <code>from ... import ...</code> statement of the output Python module without validating the identifier.</li>
<li>When an application subsequently imports this newly generated, compromised Python module, the embedded malicious Python expression is executed.</li>
<li>This execution leads to remote code execution (RCE) on the system where the generated module is imported, allowing the attacker to run arbitrary commands.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2026-63720 grants an attacker remote code execution capabilities on the system running the vulnerable <code>datamodel-code-generator</code> instance or any application that imports code generated from a malicious schema. This allows attackers to compromise the integrity and confidentiality of data, establish persistence, and potentially pivot to other systems within the environment. The severity of the impact depends on the privileges of the affected system, but generally represents a critical breach. No specific observed victims or targeted sectors are mentioned in the advisory, but any organization using affected versions of <code>datamodel-code-generator</code> to process untrusted schemas is at risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Patch <code>datamodel-code-generator</code> to version 0.70.0 or later immediately to remediate CVE-2026-63720.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>code-injection</category><category>rce</category><category>vulnerability</category></item></channel></rss>