Read the docs
TI-2026-84479 Aliases CVE-2026-63469

Code injection in fastapi-code-generator via response status-code key

Priority MEDIUM 40CWE-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 builds FastAPI applications from OpenAPI files. It writes an extra response status-code key as a single-quoted string without escaping quotes. An attacker who influences a non-primary response key in a multi-response OpenAPI operation can inject a Python expression. The injected code runs with the application's or CI process's privileges when the generated module is imported.

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 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.

Why it matters now

EPSS 0.00312 24th percentileScored 2026-11-07
Fix Fixed fastapi-code-generator (koxudaxi): 0.8.1

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

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

Upgrade 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-63469

References

  • TI-2026-84481 Code injection in fastapi-code-generator via OpenAPI route paths CVSS 4.0CRITICAL 9.3
  • TI-2026-84480 Code injection in fastapi-code-generator route docstrings 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
See all 15 →

Sources

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