Skip to content
MediumVulnerability

GHSA-83x6-42hr-jc76: CKAN MCP Server: MQA server allowlist bypass via unanchored regex (`isValidMqaServer`)

Published
Record updated
View JSON
Affected
  • @aborruso/ckan-mcp-server < 0.4.112
Fixed in
0.4.112
  • released July 9, 2026, 55 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.4%

Summary

The `ckan_get_mqa_quality` and `ckan_get_mqa_quality_details` tools in the CKAN MCP Server limit `server_url` to `dati.gov.it` using an unanchored regex in `isValidMqaServer`. URLs such as `https://dati.gov.it.attacker.com/x` and `https://dati.gov.it@attacker.com/x` pass validation, so the tools send requests to attacker-controlled hosts and return their responses to the caller.

Mitigation

Validate the parsed host instead of the raw string: parse the URL with `new URL()`, require the `https:` protocol, and compare `hostname` exactly against `dati.gov.it` or `www.dati.gov.it`. Anchoring the regex end-to-end (`/^https:\/\/(www\.)?dati\.gov\.it(\/|$)/i`) also closes the suffix trick, but URL parsing with exact host comparison is the robust fix and also neutralizes the `@`-userinfo variant.