`datamodel-code-generator` vulnerable to code injection via unescaped carriage return in GraphQL Union description
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| koxudaxi | datamodel-code-generator | affected |
|
No data.
No data.
| Vendor | Product | Versions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Koxudaxi | Datamodel-code-generator |
|
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-j884-q54q-mmx3 | `datamodel-code-generator` vulnerable to code injection via unescaped carriage return in GraphQL Union description |
No CVSS v4.0
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.210% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Koxudaxi
Koxudaxi datamodel-code-generator |
|
| Vendors & Products |
Koxudaxi
Koxudaxi datamodel-code-generator |
| Type | Values Removed | Values Added |
|---|---|---|
| Description | datamodel-code-generator generates Python data models from schema definitions. Prior to 0.60.1, GraphQL Union description values in src/datamodel_code_generator/model/template/UnionTypeStatement.jinja2 and src/datamodel_code_generator/model/template/UnionTypeStatement.py312.jinja2 are rendered into Python comments without neutralizing carriage returns in Python # comments, allowing attacker-controlled GraphQL schema content to inject Python code into generated models that runs when imported. This issue is fixed in version 0.60.1. | |
| Title | `datamodel-code-generator` vulnerable to code injection via unescaped carriage return in GraphQL Union description | |
| Weaknesses | CWE-1336 CWE-94 |
|
| References |
| |
| Metrics |
cvssV3_1
|