Advisory

PYSEC-2026-4245

Also known as: CVE-2026-105801, GHSA-5293-mq8x-g3xj

Summary

openapi-python-client: Malicious OpenAPI Documents can cause Arbitrary Code Generation

Details

Impact
A malicious OpenAPI document processed by any openapi-python-client prior to 0.29.1 can generate arbitrary Python code. When anyone imports the malicious client, that arbitrary Python code will execute.

Patches
Versions starting with 0.29.1 have updated with guardrails to prevent arbitrary code generation. Upgrade to this version immediately and audit any code previously generated from untrusted documents.

Workarounds
Do not generate clients for documents you don't completely trust. Carefully verify any existing generated code from untrusted documents.

Severity

Not rated by the source.

Dates

Published
2026-10-15 10:22 UTC
Modified
2026-10-15 14:45 UTC

Affected packages and fixes

openapi-python-client

PyPI · All systems

Affected

  • introduced 0, fixed 0.29.1 (ecosystem)

Fixed versions

0.29.1

Fix

  • Fixed version 0.29.1
    pip install --upgrade openapi-python-client==0.29.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences