Live threats

All CVEs / koxudaxi

CVE-2026-63470koxudaxi fastapi-code-generator

Python code injection in fastapi-code-generator via unescaped operation summary

Critical 9.3 No auth needed

Priority
71
CVSS 4.0
9.3
EPSS
—
Auth required
No
Published
Nov 3, 2026
Updated
Nov 3, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-94, CWE-116
SSVC (CISA)
Exploitation: proof of concept · Automatable: yes · Technical impact: total
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

What happens

fastapi-code-generator creates FastAPI applications from OpenAPI files. Prior to version 0.8.1, the generator inserts the operation summary into the route handler docstring without escaping triple quotes, allowing an attacker to inject valid Python code that executes with the server process's privileges when the affected route is called.

AI-generated summary (Claude) based on NVD and CISA data. Not reviewed yet: check the details in the vendor advisory.

Show the original NVD text

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.

Source text, unmodified. NVD.

What to do

Patch available · fixed versions: 0.8.1

Update fastapi-code-generator to version 0.8.1 or later to properly escape triple quotes in operation summaries.

Vendor advisory · github.com ↗

AI-generated from public data; not reviewed.

  1. Apply the vendor's security update for fastapi-code-generator.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI fastapi-code-generator < 0.8.1 0.8.1 pip install "fastapi-code-generator>=0.8.1"

Per OSV / GitHub Advisories (GHSA-h667-4jj2-cgv4). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

On social media

1 person and 1 post on Bluesky in the last 30 days.

Most recent posts, without bots or automated feeds. The text belongs to its authors. Search on Bluesky

Official sources

References

Links published by the sources. Open them with care.