Live threats

All CVEs / koxudaxi

CVE-2026-63469koxudaxi fastapi-code-generator

Code injection in fastapi-code-generator via unescaped OpenAPI responses

Critical 9.3 No auth needed

Priority
71
CVSS 4.0
9.3
EPSS
—
Auth required
No
Published
Nov 3, 2026
Updated
Nov 9, 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 generates FastAPI applications from OpenAPI files. Versions prior to 0.8.1 fail to properly escape quotes in additional response keys, allowing injection of valid Python expressions. An attacker can control or influence the second response key in a multi-response OpenAPI operation to execute arbitrary code when the generated module is imported.

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

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.

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-6xmv-cjr5-w3q8). 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.

Official sources

References

Links published by the sources. Open them with care.