# CVE-2026-63469: fastapi-code-generator code injection via unescaped response keys

Source: https://junglewise.ai/threats/cve-2026-63469-fastapi-code-generator-creates-fastapi-applications-from-openapi  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-03. Updated: 2026-11-03  
License: CC BY 4.0 with a link back

CVE-2026-63469 · Severity: critical · CVSS 4 · Published 2026-11-03

fastapi-code-generator is a tool that automatically creates FastAPI web application code from OpenAPI specification files. Prior to version 0.8.1, the generator fails to properly escape special characters in OpenAPI response keys, allowing an attacker to inject malicious Python code into the generated application. When the generated code is imported and executed, this injected code runs with the privileges of the application or CI/CD pipeline that loads it.

Technologies: [Koxudaxi Fastapi-Code-Generator](https://junglewise.ai/threats/technologies/fastapi-code-generator), [fastapi-code-generator (PyPI)](https://junglewise.ai/threats/technologies/pypi-fastapi-code-generator). Vendors: [Koxudaxi](https://junglewise.ai/threats/vendors/koxudaxi), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-63469 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-63469 being exploited in the wild.

**How severe is CVE-2026-63469?** Critical severity, with a CVSS score of 4, published 3 November 2026.

**Which products and versions are affected?** Koxudaxi Fastapi-Code-Generator before 0.8.1; fastapi-code-generator (PyPI) < 0.8.1, ECOSYSTEM:introduced=0,fixed=0.8.1.

**Is there a fix for CVE-2026-63469?** Yes. fastapi-code-generator (PyPI): upgrade to 0.8.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-63469 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-63469?** Check whether you run Koxudaxi Fastapi-Code-Generator or fastapi-code-generator (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- fastapi-code-generator (PyPI): upgrade to 0.8.1 or later

  ```sh
  pip install "fastapi-code-generator>=0.8.1"
  ```


## Technical details

The vulnerability is a code injection flaw in the code generation logic. The generator constructs Python dictionary literals for FastAPI route decorators using unsanitized OpenAPI response status-code keys as unescaped single-quoted strings. An attacker-controlled second response key in a multi-response OpenAPI operation can close the string literal and inject arbitrary Python expressions that are evaluated at import time. While syntactically invalid payloads merely fail generation, syntactically valid expressions execute with application privileges.

## Affected products

- koxudaxi fastapi-code-generator before 0.8.1

## Identifiers

- CVE-2026-63469
- GHSA-6xmv-cjr5-w3q8

## Timeline

- 2026-11-03: disclosed
- 2026-07-01: patched

## References

- [https://github.com/koxudaxi/fastapi-code-generator/commit/49301dbdb82170d7f50877419d994b05cb1fa2bc](https://github.com/koxudaxi/fastapi-code-generator/commit/49301dbdb82170d7f50877419d994b05cb1fa2bc)
- [https://github.com/koxudaxi/fastapi-code-generator/commit/b3b9bd66e0b0c4d8c686fda700258104615a1332](https://github.com/koxudaxi/fastapi-code-generator/commit/b3b9bd66e0b0c4d8c686fda700258104615a1332)

## Related threats

- [fastapi-code-generator code injection via unescaped OpenAPI path](https://junglewise.ai/threats/cve-2026-63471-fastapi-code-generator-creates-fastapi-applications-from-openapi)
- [fastapi-code-generator code injection in docstring generation](https://junglewise.ai/threats/cve-2026-63470-fastapi-code-generator-creates-fastapi-applications-from-openapi)
