Skip to main content

JSONSchema2PoPo2 EUVDEUVD-2026-137349

| CVE-2026-137999 HIGH
Code Injection (CWE-94)
2026-11-27 VulnCheck GHSA-qjhw-792c-66p4
8.5
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted JSON Schema with quoted default
  2. Exploit
    Victim runs JSONSchema2PoPo2 generator
  3. Execution
    Single quote breaks __init__ string literal
  4. Impact
    Injected Python executes on module import

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires a developer to run the JSONSchema2PoPo2 code generator (version ≤3.0.3) against an attacker-controlled or otherwise untrusted JSON Schema in which a string property 'default' (or 'format') value is crafted to contain a single quote that breaks out of the generated Python __init__ literal, followed by importing the generated module. Limiting factors: this is a local/build-time vector (AV:L) that needs victim interaction (UI:P) - processing the malicious schema and importing the output - rather than a remotely reachable service; it affects the codegen workflow, not a deployed runtime, and only unpatched versions through 3.0.3 (fixed in 3.1.0). No special runtime configuration is required beyond using the vulnerable generator on untrusted schema input.

Impact

This is a genuine code-execution flaw (CWE-94) but the real-world risk is bounded and does not match a naive reading of the 8.5 score. The supplied CVSS 4.0 vector is CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - critically AV:L (local attack vector) and UI:P (passive user interaction required), meaning this is NOT a remote, unauthenticated, zero-interaction network attack despite the high impact metrics (VC/VI/VA:H). Exploitation depends on a developer running the JSONSchema2PoPo2 generator (≤3.0.3) over an attacker-influenced JSON Schema and then importing the generated module, so it is a build-time / supply-chain-style code-injection rather than a runtime service compromise. Signals are consistent rather than conflicting: the vendor Decision label is 'this_week' (not act_now/emergency), there is no CISA KEV listing and no EPSS score in the input, and no confirmed working exploit code - only an issue, a patch PR, and a VulnCheck advisory. Net: a real, patchable priority for anyone who uses this library in a codegen pipeline, but low urgency for the general population because the product footprint is small and the attack requires local tooling plus victim interaction. Exploitation status: no public exploit identified at time of analysis.

Exploit ScenarioDerived

An attacker publishes or supplies a crafted JSON Schema whose string property 'default' (or 'format') value contains a single quote plus Python code; a developer runs JSONSchema2PoPo2 ≤3.0.3 to generate Python classes from it. Because the value is written unescaped into the generated __init__ signature, the injected code executes the moment the generated module is imported, achieving arbitrary code execution in the developer's/build environment. This requires local use of the generator and the victim to process the untrusted schema (AV:L, UI:P); no confirmed public exploit code is available, only the upstream issue and advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 27, 2026

Code injection in JSONSchema2PoPo2 through 3.0.3 lets a crafted JSON Schema smuggle Python statements into the generated class file, which execute when that generated module is imported. The root cause is CWE-94: schema-supplied values (string defaults, format, pattern, validations, enum values and descriptions) were pasted into the generated source unescaped, so a single quote inside a string property default breaks out of the literal in the generated __init__ signature; the same escaping gap affected the JavaScript and Go backends. Exposure is confined to the code generation workflow rather than a deployed service, since the flaw requires someone to run the generator against the malicious schema and then import the resulting module (CVSS 4.0 AV:L, UI:P, no privileges required); no public exploit code was identified at time of analysis and the issue is not in CISA KEV. Vendor-released patch: 3.1.0.

RemediationAI

Upgrade JSONSchema2PoPo2 to 3.1.0, the vendor-released patch that adds escaping filters and target-language identifier validation (pull request 25, commit cdb00f607a149f75b79a0f342b5881fd49ab4667, issue 24 at https://github.com/MikeDombo/JSONSchema2PoPo2/issues/24). Until the upgrade can be scheduled, the practical compensating control is to stop running the vulnerable generator on schemas from untrusted or third-party sources, or to generate only inside a disposable, network-isolated environment and to review the generated source before importing it; these reduce but do not eliminate risk, because a single overlooked single quote still yields executable code. Note that 3.1.0 deliberately skips validation for custom templates passed with -jt and for plugin-provided templates, so any pipeline using those still needs manual review of schema-derived values. The upgrade also carries behaviour changes worth testing first: string defaults on "type": "string" properties are now always emitted as strings in JavaScript (previously "5" became the number 5, "null" became null and a value like "pending" raised a ReferenceError at construction), schema values previously pasted in as code (non-string property defaults, keywords such as maximum, non-string enum values) are now emitted as strings unless they are numbers or plain names, and schema-derived type, property and enum names must be valid identifiers in the target language or generation halts with an error instead of producing broken code.

Affected VersionsENISA

JSONSchema2PoPo2 0 ≤3.0.3

Affected Packages

euvd jsonschema2popo2 no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

JSONSchema2PoPo2 is a Python utility that converts JSON Schema documents into plain-old-Python-object classes, with additional backends that emit JavaScript and Go, all driven by Jinja templates (the Python backend via jsonschema2popo/python/python_class.tmpl, cited at line 70). Because the generator treated schema content as trusted text, values taken from the schema were interpolated straight into template output instead of being quoted or escaped: defaults of non-string properties, format and pattern strings, validation keywords such as maximum, enum values and descriptions could all terminate a string literal or a comment and let the remainder be parsed as code in the target language. That is a classic CWE-94 code injection surface, with the impact realized at build time - whoever consumes the generated module executes the injected statements at import. The 3.1.0 fix adds an is_identifier() check that rejects schema-derived type, property and enum names that are not valid identifiers in the target language, and introduces escaping filters (json_quote, json_value, json_literal) in the Python, JavaScript and Go templates. The changelog explicitly notes that custom templates supplied with -jt and plugin-provided templates are not covered by the new validation, so third-party templates retain the old interpolation behaviour.

Know when Jsonschema2Popo2 gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.5 HIGH
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.8 HIGH

Local codegen vector (AV:L) requiring the victim to process an untrusted schema and import the output (UI:R); unescaped injection yields full code execution, so C/I/A:H and PR:N.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

CVE-2026-137999 is a high-severity code injection vulnerability in JSONSchema2PoPo2 version 3.0.3 and earlier that allows a malicious JSON schema to embed Python statements into generated class files. This affects development teams using the tool to generate code, potentially leading to arbitrary code execution when the generated module is imported. Leadership should prioritize patching because the vulnerability enables code execution in developer environments, which could compromise build pipelines and intellectual property.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 87% exploitable
Prevalence
Rare
niche individual-maintained Python codegen library, minimal enterprise footprint
Social Media
3
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy