{"id":"CVE-2026-108383","published":"2026-10-13T18:17:17.610","lastModified":"2026-10-16T16:00:33.533","description":"dataclasses-avroschema generates Avro schemas from Python dataclasses, Pydantic models, and Faust Records and generates Python code from Avro schemas. From version 0.38.0 through 0.70.5, FieldRepresentation.get_field_default renders a schema-controlled enum field default as an enum member reference after applying case conversion but without validating it as an identifier. Newlines, operators, and punctuation can escape the intended reference and inject constrained statements into the generated module, allowing namespace modification or preventing the module from loading. Version 0.70.6 fixes the vulnerability by validating enum defaults as names.","cvssScore":8.8,"cvssSeverity":"HIGH","cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","cwes":["CWE-94"],"vendors":[],"products":[],"references":[{"url":"https://github.com/marcosschroh/dataclasses-avroschema/commit/429f3d705d2d04c0c65e2ef832daed5ff91318fc","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-4xxf-mv22-hcr8","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-4xxf-mv22-hcr8","tags":[]}],"exploitRefs":[{"url":"https://github.com/marcosschroh/dataclasses-avroschema/commit/429f3d705d2d04c0c65e2ef832daed5ff91318fc","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-4xxf-mv22-hcr8","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-4xxf-mv22-hcr8","tags":[]}],"hasPoc":true,"ai":{"summary":"The vulnerability allows attackers to inject malicious code into generated Python modules by manipulating enum field defaults in Avro schema generation. This occurs when case conversion doesn't validate enum references as proper identifiers, enabling injection of arbitrary statements that can modify namespaces or prevent module loading.","exploitability":"Exploitation requires a vulnerable version (0.38.0-0.70.5) and control over dataclass field definitions that use enum defaults, with minimal preconditions for successful injection.","blast_radius":"The vulnerability could affect any application using dataclasses-avroschema to generate Python code from Avro schemas, potentially leading to remote code execution or module loading failures in applications that import the generated code.","remediation":"Upgrade to version 0.70.6 or later to fix the enum default validation issue.","detection":"No reliable host or network indicator is derivable from the published description.","tags":["code-injection","deserialization","python"],"model":"garnet-coder","analyzedAt":"2026-10-17T08:50:55.501Z"}}