Skip to main content
← Vulnerabilities

fastapi-code-generator: Call-time RCE via operation summary -> unescaped route-handler docstring

Affects apps generated by fastapi-code-generator from specs that an attacker controls or influences, where an operation summary contains triple double quotes. Fixed in 0.8.1.

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

9.3CriticalCNA
Exploited
Proof of concept public, per CISA
Fix
Fixed in 0.8.1
Who is exposed
Not reported

Do first: Upgrade to a fixed version: 0.8.1.

45Pcve.now Index 45 of 100 · methodology v3 · provisional
  • Exploitation15/40CISA rates a proof of concept as public
  • Exposure20/25No login or user action needed, CISA rates it automatable · Data gap: Advisories don't say whether default setups are affected
  • Reach?/20Reach: unknown (data gap). No tracked technology or package matched
  • Severity10/10CVSS 9.3, total technical impact per CISA
  • No patch0/5No signal

What would change the score

  • Would score about 75 if added to CISA KEV
  • Would score about 70 if CISA's SSVC rates exploitation active
  • Would score about 50 if advisories confirm default setups are exposed

CVE-2026-63470 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
45/100 · provisional
Unclear
Fix
Fixed in 0.8.1
None on Exploit-DB, Metasploit or GitHub
On X
View the cve.now post
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: total

Summary

fastapi-code-generator, a tool that builds FastAPI applications from OpenAPI specification files, is affected. An attacker who can influence an operation's summary field in an OpenAPI file can inject Python code that runs with the server's privileges when the affected route handler is called.

Read the original description

fastapi-code-generator creates FastAPI applications from OpenAPI files. Prior to 0.8.1, the generator inserts Operation.summary into a generated route-handler docstring as a triple-double-quoted string without escaping embedded triple quotes. An attacker-controlled or attacker-influenced operation summary can close the docstring and inject a valid Python expression statement into the handler body. Syntax-breaking input only causes generation to fail, but syntactically valid generated code executes with the server process's privileges when the affected route handler is called. This call-time route-handler docstring sink is distinct from the project's separate import-time route-path and additional-response-key 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. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: total

  4. Record last updated
  5. 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-63470

Is CVE-2026-63470 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. CISA's SSVC assessment notes a proof of concept exists. No public exploit code is tracked.Source: cve.now feed data

What does this mean?

An operation summary containing triple double quotes is written into the generated route handler's docstring without escaping. When the affected endpoint is invoked, this can run code on the server with the server process's privileges.Source: github.com

Which versions are affected by CVE-2026-63470?

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 of fastapi-code-generator are in the affected range. The problem needs a generated app whose OpenAPI spec is attacker-controlled or attacker-influenced and has an operation summary with triple double quotes. To check a project, look at the fastapi-code-generator version used to generate it and the operation summaries in its spec.Source: github.com

How do I fix CVE-2026-63470?

Upgrade fastapi-code-generator to 0.8.1 or later.Source: github.com