{"api_version":"1","generated_at":"2026-11-12T10:43:04+00:00","cve":"CVE-2026-126991","urls":{"html":"https://cve.report/CVE-2026-126991","api":"https://cve.report/api/cve/CVE-2026-126991.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-126991","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-126991"},"summary":{"title":"SPARQL Injection in MISP Wikidata Lookup Module via Unescaped User Input","description":"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.","state":"PUBLISHED","assigner":"CIRCL","published_at":"2026-11-12 08:16:41","updated_at":"2026-11-12 08:16:41"},"problem_types":["CWE-94","CWE-209","CWE-94 CWE-94 Improper Control of Generation of Code ('Code Injection')","CWE-209 CWE-209 Generation of Error Message Containing Sensitive Information"],"metrics":[{"version":"4.0","source":"5a6e4751-2f3f-4070-9419-94fb35b644e8","type":"Secondary","score":"5.3","severity":"MEDIUM","vector":"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/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","data":{"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/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","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","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}},{"version":"4.0","source":"CNA","type":"CVSS","score":"5.3","severity":"MEDIUM","vector":"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","data":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":5.3,"baseSeverity":"MEDIUM","privilegesRequired":"LOW","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","vulnerabilityResponseEffort":"NOT_DEFINED"}}],"references":[{"url":"https://misp.github.io/misp-modules/expansion/#wikidata-lookup","name":"https://misp.github.io/misp-modules/expansion/#wikidata-lookup","refsource":"5a6e4751-2f3f-4070-9419-94fb35b644e8","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9","name":"https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9","refsource":"5a6e4751-2f3f-4070-9419-94fb35b644e8","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/MISP/misp-modules/pull/869","name":"https://github.com/MISP/misp-modules/pull/869","refsource":"5a6e4751-2f3f-4070-9419-94fb35b644e8","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/MISP/misp-modules","name":"https://github.com/MISP/misp-modules","refsource":"5a6e4751-2f3f-4070-9419-94fb35b644e8","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-126991","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126991","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"misp","product":"misp-modules","version":"affected unspecified 3.1.4 semver","platforms":[]}],"timeline":[],"solutions":[{"source":"CNA","title":"","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.","time":"","lang":"en"}],"workarounds":[],"exploits":[],"credits":[{"source":"CNA","value":"Alexandre Dulaunoy","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"cpes":["cpe:2.3:a:misp:misp-modules:*:*:*:*:*:*:*:*"],"modules":["misp_modules/modules/expansion/wiki.py"],"product":"misp-modules","programFiles":["misp_modules/modules/expansion/wiki.py"],"repo":"https://github.com/MISP/misp-modules","vendor":"misp","versions":[{"lessThanOrEqual":"3.1.4","status":"affected","version":"unspecified","versionType":"semver"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:misp:misp-modules:*:*:*:*:*:*:*:*","versionEndExcluding":"3.1.4","versionStartIncluding":"0","vulnerable":true}],"negate":false,"operator":"OR"}]}],"credits":[{"lang":"en","type":"remediation developer","value":"Alexandre Dulaunoy"}],"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."}],"impacts":[{"capecId":"CAPEC-143","descriptions":[{"lang":"en","value":"CAPEC-143 SQL Injection"}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":5.3,"baseSeverity":"MEDIUM","privilegesRequired":"LOW","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]},{"format":"SSVC","other":{"content":{"options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"Supplier","timestamp":"2026-11-12T05:54:11Z","version":"2.0.3"},"type":"SSVC"},"scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-94","description":"CWE-94 Improper Control of Generation of Code ('Code Injection')","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-209","description":"CWE-209 Generation of Error Message Containing Sensitive Information","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-11-12T07:33:51.485Z","orgId":"5a6e4751-2f3f-4070-9419-94fb35b644e8","shortName":"CIRCL"},"references":[{"name":"Security patch","tags":["patch"],"url":"https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9"},{"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"}],"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."}],"title":"SPARQL Injection in MISP Wikidata Lookup Module via Unescaped User Input","x_gcve":[{"extensions":{"bcp-05-x-01":{"ai_annotations":[{"ai_level":"generated","description":"Draft vulnerability metadata was generated from a git-format patch using an Ollama-hosted language model. Human validation is required before publication.","gna_source":1,"models":[{"gna_source":1,"identifier":"qwen3.8:27b","name":"qwen3.8:27b","source":"ollama"}],"review_status":"partial","scope":"record","tags":["ai-computer-assisted:llm-generated","ai-computer-assisted:classification"]}]},"bcp-05-x-02":{"x_patch2vuln":{"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."],"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."}],"commit":"7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9","confidence":"medium","credits":[{"lang":"en","type":"remediation developer","value":"Alexandre Dulaunoy"}],"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.","draft":false,"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.","generatedAt":"2026-11-12T05:54:11.233388Z","generator":"patch2vuln.py","model":"qwen3.8:27b","modelComparison":{"potentialErrors":[],"rankings":[{"agreementScore":11,"assumptionCount":6,"confidence":"medium","model":"qwen3.8:27b","score":6}],"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."},"patchSha256":"5b0d882d17baea052254770c3c94d50c8e1ab2314fa4eec89088c15e059f2837","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.","patchTruncated":false,"patches":[{"commit":"7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9","date":"Thu, 12 Nov 2026 04:47:41 +0000","patchSha256":"5b0d882d17baea052254770c3c94d50c8e1ab2314fa4eec89088c15e059f2837","retrievedAt":"2026-11-12T05:53:20.752027Z","source":"https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9.patch","sourceUrl":"https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9.patch","subject":"Improve Wikidata enrichment and return MISP standard"}],"source":"https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9.patch","ssvc":{"options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"Supplier","timestamp":"2026-11-12T05:54:11Z","version":"2.0.3"},"subject":"Improve Wikidata enrichment and return MISP standard","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."}]}},"bcp-05-x-03":{"x_timeline":{"events":[{"description":"Corrective change authored (7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9): Improve Wikidata enrichment and return MISP standard","id":"evt-fix-developed-1","references":["https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9.patch"],"timestamp":"2026-11-12T04:47:41Z","type":"fix-developed"},{"description":"Patch retrieved from the supplied URL; retrieval time is used as the default availability time.","id":"evt-fix-available-1","references":["https://github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b344d9.patch"],"timestamp":"2026-11-12T05:53:20.752027Z","type":"fix-available"}]}}},"recordType":"advisory","vulnId":"gcve-1-2026-20333"}]}},"cveMetadata":{"assignerOrgId":"5a6e4751-2f3f-4070-9419-94fb35b644e8","assignerShortName":"CIRCL","cveId":"CVE-2026-126991","datePublished":"2026-11-12T07:33:51.485Z","dateReserved":"2026-11-12T07:30:41.366Z","dateUpdated":"2026-11-12T07:33:51.485Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-12 08:16:41","lastModifiedDate":"2026-11-12 08:16:41","problem_types":["CWE-94","CWE-209","CWE-94 CWE-94 Improper Control of Generation of Code ('Code Injection')","CWE-209 CWE-209 Generation of Error Message Containing Sensitive Information"],"metrics":{"cvssMetricV40":[{"source":"5a6e4751-2f3f-4070-9419-94fb35b644e8","type":"Secondary","cvssData":{"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/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","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","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}}],"ssvcV203":[{"source":"5a6e4751-2f3f-4070-9419-94fb35b644e8","ssvcData":{"timestamp":"2026-11-12T05:54:11Z","options":[{"exploitation":"none"},{"automatable":"yes"},{"technicalImpact":"partial"}],"role":"Supplier","version":"2.0.3"}}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"126991","Ordinal":"1","Title":"SPARQL Injection in MISP Wikidata Lookup Module via Unescaped Us","CVE":"CVE-2026-126991","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"126991","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"SPARQL Injection in MISP Wikidata Lookup Module via Unescaped Us"}]}}}