Technical impact
JSONSchema2PoPo2 includes a code injection flaw that permits arbitrary Python code to be injected by supplying malicious default or format values in a JSON Schema. The vulnerable template writes these values directly into the generated __init__ method signature without escaping. When an attacker supplies a single quote, the literal is broken and the injected code is executed during import of the generated module, giving the attacker full control over the host process.
Affected Systems
The vulnerability affects the MikeDombo:JSONSchema2PoPo2 project, versions up to and including 3.0.3. No other versions or products are listed as affected.
Risk and Exploitability
The CVSS score of 8.5 indicates high severity. The EPSS score is not available, so exploitation probability cannot be quantified. The issue is not listed in the CISA KEV catalog. Attackers can exploit the flaw by crafting a JSON Schema with malicious defaults or formats that, when processed by JSONSchema2PoPo2, generate a module containing injected code. The module must then be imported in a trusted environment for the payload to execute.