Summary
CKAN MCP Server: MQA server allowlist bypass via unanchored regex (isValidMqaServer)
The ckan_get_mqa_quality and ckan_get_mqa_quality_details tools restrict their server_url argument to dati.gov.it via a regular expression. The regex is anchored only at the start and places no boundary after the host, so any URL whose host merely begins with dati.gov.it, or that uses dati.gov.it as URL userinfo before an @, passes validation while actually targeting an attacker-controlled host.
Affected code
// src/tools/quality.ts
const ALLOWED_SERVER_PATTERNS = [
/^https?:\/\/(www\.)?dati\.gov\.it/i // <-- no end anchor / host boundary
];
export function isValidMqaServer(serverUrl: string): boolean {
return ALLOWED_SERVER_PATTERNS.some(pattern => pattern.test(serverUrl));
}
All of the following return true:
| URL | Real host |
|---|---|
https://dati.gov.it.attacker.com/x |
dati.gov.it.attacker.com (attacker) |
http://dati.gov.it.evil.example/api |
dati.gov.it.evil.example (attacker) |
https://[email protected]/x |
attacker.com (userinfo trick) |
After passing this check, server_url flows into getMqaQuality/getMqaQualityDetails, which call makeCkanRequest(serverUrl, "package_show", { id }). The server therefore issues a request to the attacker-controlled host and returns its (parsed) response to the caller.
Proof of concept
poc/mqa-allowlist-poc.mjs runs the verbatim regex over benign and malicious URLs:
accepted expected_legit url
true true https://dati.gov.it/opendata <- legit
true false https://dati.gov.it.attacker.com/x <- BYPASS
true false http://dati.gov.it.evil.example/api <- BYPASS
true false https://[email protected]/x <- BYPASS
Impact
- The intended "dati.gov.it only" trust boundary for the MQA tools is defeated; they can be driven against arbitrary external hosts.
- The attacker host receives the request (including the
dataset_id) and controls the response body that is surfaced back to the model/user, enabling response spoofing and, in an agentic setting, indirect prompt-injection content delivered under the guise of a trusted-portal tool. - Contributes to SSRF surface: while
makeCkanRequestblocks private/internal IPs, this bypass removes the domain restriction that the code intends to enforce for these tools.
The @-userinfo variant is the most severe form because validation passes on a string whose actual host is fully attacker-chosen.
The application does not adequately validate input before processing it, allowing unexpected values to reach sensitive code paths. Typical impact: varies by context: data corruption, logic bypass, or denial of service.
CVE-2026-73845 has a CVSS score of 5.3 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.4.112); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Validate the parsed host, not the raw string. For example:
function isValidMqaServer(serverUrl) {
let u; try { u = new URL(serverUrl); } catch { return false; }
if (u.protocol !== "https:") return false;
const h = u.hostname.toLowerCase();
return h === "dati.gov.it" || h === "www.dati.gov.it";
// or: h === "dati.gov.it" || h.endsWith(".dati.gov.it")
}
Anchoring the regex end-to-end (/^https:\/\/(www\.)?dati\.gov\.it(\/|$)/i) also closes the suffix trick, but URL-parsing + exact host comparison is the robust fix and also neutralizes the @-userinfo variant.
Frequently Asked Questions
- What is CVE-2026-73845? CVE-2026-73845 is a medium-severity improper input validation vulnerability in @aborruso/ckan-mcp-server (npm), affecting versions < 0.4.112. It is fixed in 0.4.112. The application does not adequately validate input before processing it, allowing unexpected values to reach sensitive code paths.
- How severe is CVE-2026-73845? CVE-2026-73845 has a CVSS score of 5.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of @aborruso/ckan-mcp-server are affected by CVE-2026-73845? @aborruso/ckan-mcp-server (npm) versions < 0.4.112 is affected.
- Is there a fix for CVE-2026-73845? Yes. CVE-2026-73845 is fixed in 0.4.112. Upgrade to this version or later.
- Is CVE-2026-73845 exploitable, and should I be worried? Whether CVE-2026-73845 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-73845 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-73845? Upgrade
@aborruso/ckan-mcp-serverto 0.4.112 or later.