Live threats

All CVEs / koxudaxi

CVE-2026-63471koxudaxi fastapi-code-generator

Python code injection in fastapi-code-generator via unescaped OpenAPI paths

Critical 9.3 No auth needed

Priority
71
CVSS 4.0
9.3
EPSS
—
Auth required
No
Published
Nov 3, 2026
Updated
Nov 7, 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. Prior to version 0.8.1, the generator inserts OpenAPI paths into @app.get(...) decorators without escaping quotes, allowing an attacker to inject valid Python expressions. The malicious code executes with the application's or CI process's privileges 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 OpenAPI path into a generated @app.get(...) route decorator as a single-quoted generated route string without escaping embedded quotes. An attacker-controlled or attacker-influenced OpenAPI path can close the string and inject a valid Python expression into the decorator argument. 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 the decorator is evaluated. This OpenAPI path sink is distinct from the project's separate operation-summary docstring 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.

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-p2mm-64f6-gmpp). 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.