Skip to main content
← Vulnerabilities

fastapi-code-generator: Import-time RCE via response status-code key -> unescaped @app.get(..., responses={...}) dict

fastapi-code-generator versions before 0.8.1 are affected when an OpenAPI operation has a second, non-primary response. Fixed in 0.8.1.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

9.3CriticalCNA
Exploited
No known exploitation
Fix
Fixed in 0.8.1
Who is exposed
Not reported

Do first: Upgrade to a fixed version: 0.8.1.

26Pcve.now Index 26 of 100 · methodology v3 · provisional
  • Exploitation?/40Exploitation: unknown (data gap). No CISA SSVC exploitation rating yet
  • Exposure17/25No login or user action needed, reachable over the network without a login · Data gap: Advisories don't say whether default setups are affected
  • Reach?/20Reach: unknown (data gap). No tracked technology or package matched
  • Severity9.3/10CVSS 9.3
  • No patch0/5No signal

What would change the score

  • Would score about 71 if added to CISA KEV
  • Would score about 66 if CISA's SSVC rates exploitation active
  • Would score about 31 if advisories confirm default setups are exposed

CVE-2026-63469 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 9.3 (critical) and affects fastapi-code-generator; fixed in 0.8.1.

Published
Last modified
Published
Not listed in CISA KEV
26/100 · provisional
Unclear
Fix
Fixed in 0.8.1
None on Exploit-DB, Metasploit or GitHub
On X
View the cve.now post

Summary

fastapi-code-generator, a tool that builds FastAPI applications from OpenAPI specification files, is affected before version 0.8.1. A specially crafted OpenAPI file with a malicious secondary response status code can cause the generated code to run arbitrary Python commands with the privileges of the application or the CI process that imports it.

Read the original description

fastapi-code-generator creates FastAPI applications from OpenAPI files. Prior to 0.8.1, the generator inserts an additional response status-code key into the generated responses={...} route-decorator dictionary as a single-quoted Python string without escaping embedded quotes. A multi-response OpenAPI operation with an attacker-controlled or attacker-influenced second non-primary response key can close the dictionary-key literal and inject a valid Python expression. Syntax-breaking input only causes generation to fail, but syntactically valid generated code executes with the application's or CI process's privileges when the generated module is imported and its decorator arguments are evaluated. This additional-response-key sink is distinct from the project's separate route-path and operation-summary sinks. This issue is fixed in version 0.8.1.

What to do

  • Upgrade to a fixed version: 0.8.1.

Timeline

  1. CVE published
  2. First seen by cve.now
  3. Posted on X by cve.now

Affected versions

  • koxudaxi fastapi-code-generator

    fixed in 0.8.1

Evidence 4

  1. Advisory
  2. Repository
  3. Repository
  4. Repository

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

FAQ

Questions about CVE-2026-63469

Is CVE-2026-63469 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

What does this mean?

The generator inserts a response status-code key into the generated @app.get(..., responses={...}) dict without escaping it, so attacker-controlled text can run as code when the generated app is imported or started, or in the CI process that generates it.Source: github.com

Which versions are affected by CVE-2026-63469?

fastapi-code-generator: before 0.8.1.Source: cve.now feed data

Am I affected, and how do I check?

Versions before 0.8.1 are in scope. The responses={...} dict is emitted only when the OpenAPI operation has a second (non-primary) response, so check whether your specs use that. To check your installed version, run pip show fastapi-code-generator.Source: github.com

How do I fix CVE-2026-63469?

Upgrade fastapi-code-generator to 0.8.1 or later, which is the listed fixed version.Source: github.com