{"id":"CVE-2026-108381","published":"2026-10-13T18:17:17.310","lastModified":"2026-10-16T23:16:58.510","description":"dataclasses-avroschema generates Avro schemas from Python dataclasses, Pydantic models, and Faust Records and generates Python code from Avro schemas. From version 0.44.0 through 0.70.5, the Pydantic and AvroDantic model generators insert a schema field's pydantic-class value after pydantic. in a generated field annotation without safely restricting the expression. Because annotations are evaluated when the generated module is imported, a crafted value can execute arbitrary Python code. Version 0.70.6 fixes the vulnerability by restricting the value to a bare name or a call to a bare name with literal arguments.","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/pull/358","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-4jmx-9m83-vxx8","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-4jmx-9m83-vxx8","tags":[]}],"exploitRefs":[{"url":"https://github.com/marcosschroh/dataclasses-avroschema/commit/429f3d705d2d04c0c65e2ef832daed5ff91318fc","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/pull/358","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-4jmx-9m83-vxx8","tags":[]},{"url":"https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-4jmx-9m83-vxx8","tags":[]}],"hasPoc":true,"ai":{"summary":"The vulnerability allows remote code execution through unsafe evaluation of Pydantic class annotations in generated Avro schemas. An attacker can inject malicious Python code that executes during module import when using dataclasses-avroschema with Pydantic models.","exploitability":"Exploitation requires a crafted schema with malicious annotation values that get evaluated during import, making it moderately difficult to exploit without user interaction or specific deployment conditions.","blast_radius":"The vulnerability affects any application using dataclasses-avroschema with Pydantic models in versions 0.44.0 through 0.70.5, potentially leading to full system compromise when generated code is imported.","remediation":"Upgrade to version 0.70.6 or later to fix the unsafe annotation evaluation vulnerability.","detection":"No reliable host or network indicator is derivable from the published description.","tags":["rce","deserialization","python","code-injection"],"model":"garnet-coder","analyzedAt":"2026-10-17T08:50:43.585Z"}}