SPARQL Injection in MISP Wikidata Lookup Module via Unescaped User Input

Summary

CVECVE-2026-126991
StatePUBLISHED
AssignerCIRCL
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-12 08:16:41 UTC
Updated2026-11-12 08:16:41 UTC
DescriptionThe 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.

Risk And Classification

Primary CVSS: v4.0 5.3 MEDIUM from 5a6e4751-2f3f-4070-9419-94fb35b644e8

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

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


VersionSourceTypeScoreSeverityVector
4.05a6e4751-2f3f-4070-9419-94fb35b644e8Secondary5.3MEDIUMCVSS: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/C...
4.0CNACVSS5.3MEDIUMCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

CVSS v4.0 Breakdown

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Confidentiality
None
Integrity
Low
Availability
None
Sub Conf.
None
Sub Integrity
None
Sub Availability
None

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

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Misp Misp-modules affected unspecified 3.1.4 semver Not specified

References

ReferenceSourceLinkTags
misp.github.io/misp-modules/expansion 5a6e4751-2f3f-4070-9419-94fb35b644e8 misp.github.io
github.com/MISP/misp-modules/commit/7a2a7e3d9e0f67f6732bd8050ab7da79e7b3... 5a6e4751-2f3f-4070-9419-94fb35b644e8 github.com
github.com/MISP/misp-modules/pull/869 5a6e4751-2f3f-4070-9419-94fb35b644e8 github.com
github.com/MISP/misp-modules 5a6e4751-2f3f-4070-9419-94fb35b644e8 github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Alexandre Dulaunoy (en)

Additional Advisory Data

Solutions

CNA: 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.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report