Read the docs
TI-2026-84480 Aliases CVE-2026-63470

Code injection in fastapi-code-generator route docstrings

Priority HIGH 81CWE-116Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-94.

Summary

fastapi-code-generator before 0.8.1 is affected. The generator inserts an OpenAPI operation summary into a generated route-handler docstring without escaping embedded triple quotes (CWE-116). An attacker who controls or influences an operation summary can close the docstring and inject Python code that runs with the server process's privileges when the affected route handler is called.

Written with Claude Haiku 5.5 from the sources below · 2026-11-03

Description from the CNA

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00468 40th percentileScored 2026-11-07
Fix Fixed fastapi-code-generator (koxudaxi): 0.8.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
koxudaxifastapi-code-generatorbefore 0.8.10.8.1Patch availableCNA
  • fastapi-code-generator Vendorkoxudaxi Affected before 0.8.1 Fixed in 0.8.1 Patch available CNA

Remediation

Update fastapi-code-generator to version 0.8.1, which fixes this issue.

Written with Claude Haiku 5.5 from the sources below · 2026-11-03

  • Fix · CNA fastapi-code-generator (koxudaxi) Fixed in 0.8.1

Timeline

  1. 2026-11-03 Threatist record created from CVE-2026-63470
  2. 2026-11-03 CISA SSVC decision points changed
  3. 2026-11-03 Priority changed: MEDIUM → HIGH

References

  • TI-2026-84481 Code injection in fastapi-code-generator via OpenAPI route paths CVSS 4.0CRITICAL 9.3
  • TI-2026-39961 Arbitrary local file read via XSD `schemaLocation` (`xs:include`/`xs:import`) path traversal, with no remote-ref gate CVSS 3.1HIGH 7.5
  • TI-2026-39960 Information disclosure in koxudaxi datamodel-code-generator CVSS 3.1HIGH 7.5
  • TI-2026-39512 datamodel-code-generator vulnerable to SSRF via --url: no host/IP validation, follows redirects CVSS 3.1HIGH 8.2
  • TI-2026-39511 datamodel-code-generator vulnerable to SSRF via JSON-Schema `$ref` to HTTP URL (silent by default) CVSS 3.1HIGH 8.2
  • TI-2026-39483 Code injection in koxudaxi datamodel-code-generator CVSS 3.1HIGH 7.8
See all 15 →

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences