新着 / 2026年11月28日 / CVE-2026-137999
JSONSchema2PoPo2のコードインジェクション脆弱性
掲載
何が問題か
JSONSchema2PoPo2の3.0.3までのバージョンには、JSON Schemaのdefaultやformatの値がエスケープされずに書き出される問題があり、コードインジェクション(CWE-94)が報告されています。攻撃者は文字列プロパティのdefaultに一重引用符を含めることで、生成される__init__のシグネチャ内の文字列リテラルから抜け出し、任意のPythonコードを埋め込むことが可能とされています。注入されたコードは、生成されたモジュールがimportされた時点で実行されます。
悪用されると
悪用されると、生成されたモジュールをimportした環境でPythonコードが実行される可能性があります。影響を受ける範囲や実際の被害事例は公表されていません。
取るべき対応
JSONSchema2PoPo2を利用している場合は、修正版の提供状況と対応方法を公式情報で確認してください。修正版の番号は公表されていません。信頼できないJSON Schemaから生成したコードをimportしないことも、当面の対策として検討してください。
AIが出典から要約し、数値を機械照合しています。
更新履歴
初回掲載。
指標
| 深刻度(CVSS v4.0) | 重要 8.5CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
|---|---|
| 実際の攻撃での悪用 | CISA KEVには未掲載 |
| 問題の種類 | CWE-94 |
| CVE公開日 | 2026-11-27 |
出典
- NVD: CVE-2026-137999
- https://github.com/MikeDombo/JSONSchema2PoPo2/blob/54c3f5f43729c5d98a537a6441f8eda5e3b4e119/jsonschema2popo/python/python_class.tmpl#L70
- https://github.com/MikeDombo/JSONSchema2PoPo2/commit/cdb00f607a149f75b79a0f342b5881fd49ab4667
- https://github.com/MikeDombo/JSONSchema2PoPo2/issues/24
- https://github.com/MikeDombo/JSONSchema2PoPo2/pull/25
- https://www.vulncheck.com/advisories/jsonschema2popo2-through-3.0.3-code-injection-via-python-class-tmpl-template
公式の説明(英語の原文)
JSONSchema2PoPo2 through 3.0.3 contains a code injection vulnerability that allows attackers to inject Python code by supplying JSON Schema default or format values that are written unescaped. Attackers can place a single quote in a string property default to break out of the literal in the generated __init__ signature, executing injected code when the generated module is imported.