fix: patch SSRF vulnerability and upgrade vulnerable dependencies#14
Draft
Copilot wants to merge 4 commits into
Draft
fix: patch SSRF vulnerability and upgrade vulnerable dependencies#14Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Agent-Logs-Url: https://github.com/pixelsock/directus-mcp/sessions/a30add7e-d484-41b2-b133-4e3f0c5d5fe1 Co-authored-by: pixelsock <4932231+pixelsock@users.noreply.github.com>
Agent-Logs-Url: https://github.com/pixelsock/directus-mcp/sessions/a30add7e-d484-41b2-b133-4e3f0c5d5fe1 Co-authored-by: pixelsock <4932231+pixelsock@users.noreply.github.com>
…th-to-regexp) Agent-Logs-Url: https://github.com/pixelsock/directus-mcp/sessions/a30add7e-d484-41b2-b133-4e3f0c5d5fe1 Co-authored-by: pixelsock <4932231+pixelsock@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Server-Side Request Forgery vulnerability in directus-mcp
fix: patch SSRF vulnerability and upgrade vulnerable dependencies
Apr 20, 2026
Owner
|
@copilot resolve the merge conflicts in this pull request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User-supplied
fileUrlinuploadFilewas passed directly toaxios.getwith no validation, and any tool could override the Directus APIurlper-request — both sinks reachable by an unprivileged MCP client, enabling SSRF to loopback, RFC-1918, and cloud metadata endpoints.SSRF fix (
index.ts)validateUrl(rawUrl)— async guard applied at both sinks:http:/https:schemesnet.isIPv4/net.isIPv6(no DNS round-trip)isForbiddenAddress()isForbiddenAddress(addr)— blocks loopback, link-local, RFC-1918, RFC-6598 shared space, unique-local IPv6 (fc00::/7), link-local IPv6 (fe80::/10), IPv6 loopback (::1/::), IPv6-mapped IPv4 private ranges (::ffff:10.xetc.), multicast, and reserved ranges; unknown format defaults to forbiddenextractMappedIPv4(addr)— detects::ffff:x.x.x.xbypass attempts in compact and expanded formmaxRedirects: 0on the file-download fetch to block redirect-chain bypassDependency upgrades (
package.json)@modelcontextprotocol/inspector^0.10.2^0.16.6axios^1.6.7^1.13.5__proto__, data-size DoS, NO_PROXY SSRF bypass, metadata header injectionform-data^4.0.0^4.0.4Math.random)path-to-regexp(transitive)8.2.0^8.4.0viaoverrides