<?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:koxudaxi:fastapi-Code-Generator:*:*:*:*:*:*:*:* - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/cpes/cpe2.3akoxudaxifastapi-code-generator/</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>Mon, 09 Nov 2026 22:11:34 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/cpes/cpe2.3akoxudaxifastapi-code-generator/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>fastapi-code-generator: Arbitrary code execution via OpenAPI spec status-code injection (CVE-2026-63469)</title><link>https://feed.craftedsignal.io/briefs/2026-11-fastapi-code-generator-rce-538e69ce/</link><pubDate>Mon, 09 Nov 2026 22:11:34 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-11-fastapi-code-generator-rce-538e69ce/</guid><description>The fastapi-code-generator package fails to sanitize status-code keys in OpenAPI specifications, allowing attackers to inject and execute arbitrary Python code during the generation or subsequent import of a FastAPI application.</description><content:encoded><![CDATA[<p>fastapi-code-generator (versions prior to 0.8.1) is vulnerable to remote code execution (RCE) via improper neutralization of special elements in the status-code key of the responses dictionary. When an OpenAPI specification contains a crafted status-code string (e.g., <code>'404' + __import__(&quot;os&quot;).system('cmd') + 'x'</code>), the generator emits this into the route decorator. Because the generated code is evaluated when the FastAPI application is imported by the ASGI server, the injected expression executes immediately.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker creates a malicious OpenAPI specification containing an operation with a multi-response status-code key.</li>
<li>Attacker embeds a Python payload within the status-code string using single quotes to break the string literal context.</li>
<li>Attacker triggers the victim to run fastapi-code-generator using the malicious specification.</li>
<li>The tool generates a <code>main.py</code> file containing the unsanitized, injected payload within a route decorator.</li>
<li>The victim deploys the generated application to an ASGI server environment.</li>
<li>The ASGI server imports <code>main.py</code> at application startup, triggering the execution of the injected Python code.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows for arbitrary code execution with the privileges of the process running the FastAPI application. This poses a critical risk in environments where generated code is automatically processed or deployed via CI/CD pipelines.</p>
<h2 id="recommendation">Recommendation</h2>
<ol>
<li>Upgrade fastapi-code-generator to version 0.8.1 or later immediately to incorporate proper status-code key escaping.</li>
<li>Audit existing codebases generated by older versions of the tool for suspicious content within route decorators, specifically within the <code>responses={...}</code> dictionary of API endpoints.</li>
<li>Implement strict input validation on OpenAPI specifications processed by automated generation pipelines to ensure status-code keys conform to numeric or expected patterns.</li>
</ol>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category></item></channel></rss>