- Published on
datamodel-code-generator, a Python code generator pulling roughly 14.5 million downloads a month on PyPI, shipped twelve CVEs: code injection and code execution on import, SSRF, and arbitrary local file read. Seven came from reading the source. Five more came from bypassing the fixes. Here is how an attacker-controlled schema turns a model generator into remote code execution, and why patching a sink is not the same as patching a class.