{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2026-126991", "assignerOrgId": "5a6e4751-2f3f-4070-9419-94fb35b644e8", "state": "PUBLISHED", "assignerShortName": "CIRCL", "dateReserved": "2026-11-12T07:30:41.366Z", "datePublished": "2026-11-12T07:33:51.485Z", "dateUpdated": "2026-11-16T15:03:12.777Z" }, "containers": { "cna": { "descriptions": [ { "lang": "en", "value": "The Wikidata Lookup expansion module (wiki.py) in MISP misp-modules contained a SPARQL injection vulnerability. The handler function constructed a SPARQL query by directly concatenating the user-supplied text value into the query string without any escaping or parameterization: 'SELECT ?item WHERE { ?item rdfs:label\"' + request.get(\"text\") + '\" @en }'. An authenticated MISP user with access to the module could supply a crafted text attribute value containing SPARQL syntax (quotes, closing braces, UNION, SERVICE, LIMIT, etc.) to alter the structure of the query sent to the Wikidata SPARQL endpoint. This could allow an attacker to modify the query logic, extract unintended data, or cause the query to fail in ways that expose internal error details. Additionally, the old error handling path formatted raw exception objects into the response string ('wikidata API not accessible {}'.format(e)), potentially leaking internal information such as proxy credentials, query contents, or response bodies. The module also used a spoofed browser user-agent string and the deprecated Wikidata endpoint. The vulnerability required authenticated access to the MISP instance and the ability to invoke the wiki expansion module with a text attribute. The impact is limited to manipulation of the enrichment query and potential disclosure of internal error details; it does not directly compromise the MISP server or its stored data." } ], "affected": [ { "product": "misp-modules", "cpes": [ "cpe:2.3:a:misp:misp-modules:*:*:*:*:*:*:*:*" ], "versions": [ { "version": "unspecified", "status": "affected", "versionType": "semver", "lessThanOrEqual": "3.1.4" } ], "modules": [ "misp_modules/modules/expansion/wiki.py" ], "programFiles": [ "misp_modules/modules/expansion/wiki.py" ], "repo": "https://github.com/MISP/misp-modules", "vendor": "misp" } ], "references": [ { "url": "https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9", "name": "Security patch", "tags": [ "patch" ] }, { "url": "https://misp.github.io/misp-modules/expansion/#wikidata-lookup" }, { "url": "https://github.com/MISP/misp-modules/pull/869" }, { "url": "https://github.com/MISP/misp-modules" } ], "x_gcve": [ { "recordType": "advisory", "extensions": { "bcp-05-x-01": { "ai_annotations": [ { "scope": "record", "gna_source": 1, "tags": [ "ai-computer-assisted:llm-generated", "ai-computer-assisted:classification" ], "description": "Draft vulnerability metadata was generated from a git-format patch using an Ollama-hosted language model. Human validation is required before publication.", "ai_level": "generated", "review_status": "partial", "models": [ { "name": "qwen3.8:27b", "gna_source": 1, "source": "ollama", "identifier": "qwen3.8:27b" } ] } ] }, "bcp-05-x-02": { "x_patch2vuln": { "generator": "patch2vuln.py", "generatedAt": "2026-11-12T05:54:11.233388Z", "model": "qwen3.8:27b", "source": "https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9.patch", "patchSha256": "5b0d882d17baea052254770c3c94d50c8e1ab2314fa4eec89088c15e059f2837", "patchTruncated": false, "commit": "7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9", "subject": "Improve Wikidata enrichment and return MISP standard", "patches": [ { "source": "https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9.patch", "sourceUrl": "https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9.patch", "patchSha256": "5b0d882d17baea052254770c3c94d50c8e1ab2314fa4eec89088c15e059f2837", "commit": "7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9", "subject": "Improve Wikidata enrichment and return MISP standard", "date": "Thu, 12 Nov 2026 04:47:41 +0000", "retrievedAt": "2026-11-12T05:53:20.752027Z" } ], "confidence": "medium", "assumptions": [ "The CAPEC-143 mapping is the closest available pattern; no SPARQL-specific CAPEC exists in the catalog. The underlying technique (query injection via unsanitized string concatenation) is identical to SQL injection.", "CVSS PR:L assumes the attacker has authenticated access to a MISP instance with the wiki expansion module enabled. The actual privilege level required depends on MISP role configuration, which is not specified in the patch.", "The affected version range is unspecified; the patch does not include version tags or release boundaries. The vulnerability existed in module version 0.2 (as indicated by the old moduleinfo) and was fixed in version 1.0.", "The CVSS VI:L rating accounts for both the query manipulation and the old error-message information disclosure. If only the injection is considered (without the error leak), VI could be rated N.", "The patch is treated as a single vulnerability fix (SPARQL injection) with associated hardening changes (error sanitization, input validation, endpoint update). The caller asserts all changes relate to the same vulnerability.", "No evidence of active exploitation, PoC, or in-the-wild usage was found in the patch or metadata." ], "fixSummary": "The vulnerability is remediated by properly escaping user-supplied text as a SPARQL string literal using json.dumps with ensure_ascii=False, which neutralizes quotes, backslashes, newlines, and control characters. Additional hardening includes strict validation of the language tag, numeric configuration values, text length, and UUID format before query construction; validation of Wikidata response structure and entity URI format before importing results; replacement of raw exception formatting with generic error messages that do not expose upstream details; use of the modern Wikidata SPARQL endpoint with POST method; a proper MISP user-agent string; and a bounded request timeout.", "patchSummary": "The patch rewrites the wiki.py handler to: (1) escape user text via json.dumps(text, ensure_ascii=False) before embedding in the SPARQL query; (2) validate language tags with a regex, numeric settings (max_results 1-25, timeout 1-60), text length (1-2000 chars), and UUID format; (3) switch from string concatenation to a properly escaped SPARQL literal; (4) use the modern https://query.wikidata.org/sparql endpoint with POST method and a MISP user-agent; (5) validate Wikidata response bindings and entity URIs against a strict pattern before creating annotation objects; (6) replace the mutable shared misperrors dict and raw exception formatting with a ModuleError class and generic error strings; (7) add a 313-line test suite (tests/test_wiki.py) covering injection vectors, invalid inputs, malformed responses, and error sanitization; (8) update documentation and module metadata to reflect the new misp_standard output format and configuration options.", "credits": [ { "lang": "en", "value": "Alexandre Dulaunoy", "type": "remediation developer" } ], "cvssRationale": "AV:N: The module is invoked over the network via the MISP API. AC:L: The injection requires only crafting a text value with SPARQL metacharacters; no race conditions or complex prerequisites. AT:N: No need to manipulate the attack target. PR:L: Requires authenticated access to a MISP instance with the wiki module enabled. UI:N: No user interaction beyond the API call. VC:N: The queried data is public Wikidata; no confidential MISP data is exposed. VI:L: An attacker can alter the enrichment results (integrity of advisory annotations) and the old error path could leak internal details. VA:N: No meaningful availability impact on the MISP system. SC/SI/SA:N: No impact on external systems beyond the public Wikidata service. Overall severity is low given the limited blast radius.", "ssvc": { "version": "2.0.3", "role": "Supplier", "timestamp": "2026-11-12T05:54:11Z", "options": [ { "Exploitation": "none" }, { "Automatable": "yes" }, { "Technical Impact": "partial" } ] }, "weaknessRationale": [ { "cweId": "CWE-94", "rationale": "The module dynamically constructs a SPARQL query by concatenating untrusted user input directly into the query string without neutralizing special elements. This is the same pattern as code/query injection: the intended query structure is modified by attacker-controlled input. SPARQL is a query language interpreted by the Wikidata endpoint, making this a code injection into a query interpreter." }, { "cweId": "CWE-209", "rationale": "The old code formatted raw exception objects into the error response string ('wikidata API not accessible {}'.format(e)), which could expose internal details such as proxy credentials, full query text, or upstream response bodies. The fix replaces this with generic error messages." } ], "capecRationale": [ { "capecId": "CAPEC-143", "rationale": "CAPEC-143 describes injection of query language fragments through unsanitized input into a dynamically constructed query. Although the CAPEC name references SQL specifically, the attack pattern is identical: an attacker supplies input containing query-language metacharacters (quotes, braces, keywords) that alter the structure of the query sent to an interpreter. SPARQL injection follows the same pattern. This is the closest available CAPEC; no SPARQL-specific CAPEC exists in the catalog. The uncertainty is that the CAPEC is SQL-specific in naming, but the underlying technique (query injection via string concatenation) is the same." } ], "draft": false, "modelComparison": { "selectedModel": "qwen3.8:27b", "selectionMethod": "deterministic-consensus-v1", "selectionNotice": "The selected result is closest to model consensus; this heuristic does not establish factual correctness and human review remains required.", "rankings": [ { "model": "qwen3.8:27b", "score": 6, "agreementScore": 11, "confidence": "medium", "assumptionCount": 6 } ], "potentialErrors": [] } } }, "bcp-05-x-03": { "x_timeline": { "events": [ { "type": "fix-developed", "timestamp": "2026-11-12T04:47:41Z", "description": "Corrective change authored (7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9): Improve Wikidata enrichment and return MISP standard", "references": [ "https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9.patch" ], "id": "evt-fix-developed-1" }, { "id": "evt-fix-available-1", "type": "fix-available", "timestamp": "2026-11-12T05:53:20.752027Z", "description": "Patch retrieved from the supplied URL; retrieval time is used as the default availability time.", "references": [ "https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9.patch" ] } ] } } }, "vulnId": "gcve-1-2026-20333" } ], "title": "SPARQL Injection in MISP Wikidata Lookup Module via Unescaped User Input", "problemTypes": [ { "descriptions": [ { "lang": "en", "cweId": "CWE-94", "description": "CWE-94 Improper Control of Generation of Code ('Code Injection')", "type": "CWE" } ] }, { "descriptions": [ { "lang": "en", "cweId": "CWE-209", "description": "CWE-209 Generation of Error Message Containing Sensitive Information", "type": "CWE" } ] } ], "metrics": [ { "format": "CVSS", "scenarios": [ { "lang": "en", "value": "GENERAL" } ], "cvssV4_0": { "version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED" } }, { "format": "SSVC", "scenarios": [ { "lang": "en", "value": "GENERAL" } ], "other": { "type": "SSVC", "content": { "version": "2.0.3", "role": "Supplier", "timestamp": "2026-11-12T05:54:11Z", "options": [ { "Exploitation": "none" }, { "Automatable": "yes" }, { "Technical Impact": "partial" } ] } } } ], "solutions": [ { "lang": "en", "value": "The vulnerability is remediated by properly escaping user-supplied text as a SPARQL string literal using json.dumps with ensure_ascii=False, which neutralizes quotes, backslashes, newlines, and control characters. Additional hardening includes strict validation of the language tag, numeric configuration values, text length, and UUID format before query construction; validation of Wikidata response structure and entity URI format before importing results; replacement of raw exception formatting with generic error messages that do not expose upstream details; use of the modern Wikidata SPARQL endpoint with POST method; a proper MISP user-agent string; and a bounded request timeout." } ], "impacts": [ { "capecId": "CAPEC-143", "descriptions": [ { "lang": "en", "value": "CAPEC-143 SQL Injection" } ] } ], "credits": [ { "lang": "en", "value": "Alexandre Dulaunoy", "type": "remediation developer" } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:a:misp:misp-modules:*:*:*:*:*:*:*:*", "versionStartIncluding": "0", "versionEndExcluding": "3.1.4" } ] } ] } ], "providerMetadata": { "orgId": "5a6e4751-2f3f-4070-9419-94fb35b644e8", "shortName": "CIRCL", "dateUpdated": "2026-11-12T07:33:51.485Z" } }, "adp": [ { "metrics": [ { "other": { "type": "ssvc", "content": { "timestamp": "2026-11-16T15:03:03.553158Z", "id": "CVE-2026-126991", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "version": "2.0.3" } } } ], "title": "CISA ADP Vulnrichment", "providerMetadata": { "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP", "dateUpdated": "2026-11-16T15:03:12.777Z" } } ] } }