Critical severity9.6NVD Advisory· Published Jul 9, 2025· Updated Apr 15, 2026
CVE-2025-6514
CVE-2025-6514
Description
mcp-remote is exposed to OS command injection when connecting to untrusted MCP servers due to crafted input from the authorization_endpoint response URL
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
mcp-remotenpm | >= 0.0.5, < 0.1.16 | 0.1.16 |
Patches
1607b226a356cForcibly escape username/pass for basic auth URLs too
2 files changed · +7 −0
src/lib/utils.test.ts+5 −0 modified@@ -84,6 +84,11 @@ describe('sanitizeUrl', () => { const result = sanitizeUrl('https://example.com?empty&hasvalue=test') expect(result).toBe('https://example.com/?empty&hasvalue=test') }) + + it('should encode basic auth', () => { + const result = sanitizeUrl('http://user$(calc)r:pass$(calc)word@domain.com') + expect(result).toBe('http://user%24(calc)r:pass%24(calc)word@domain.com/') + }) }) describe('should handle complex URLs', () => {
src/lib/utils.ts+2 −0 modified@@ -722,6 +722,8 @@ export function sanitizeUrl(raw: string) { if (url.hostname !== encodeURIComponent(url.hostname)) abort() // Forcibly sanitise all the pieces of the URL + if (url.username) url.username = encodeURIComponent(url.username) + if (url.password) url.password = encodeURIComponent(url.password) url.pathname = url.pathname.slice(0, 1) + encodeURIComponent(url.pathname.slice(1)).replace(/%2f/ig,'/') url.search = url.search.slice(0, 1) + Array.from(url.searchParams.entries()).map(sanitizeParam).join('&') url.hash = url.hash.slice(0, 1) + encodeURIComponent(url.hash.slice(1))
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- github.com/advisories/GHSA-6xpm-ggf7-wc3pghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-6514ghsaADVISORY
- github.com/geelen/mcp-remote/commit/607b226a356cb61a239ffaba2fb3db1c9dea4bacnvdWEB
- jfrog.com/blog/2025-6514-critical-mcp-remote-rce-vulnerabilitynvdWEB
- research.jfrog.com/vulnerabilities/mcp-remote-command-injection-rce-jfsa-2025-001290844ghsaWEB
- research.jfrog.com/vulnerabilities/mcp-remote-command-injection-rce-jfsa-2025-001290844/nvd
News mentions
0No linked articles in our index yet.