🔍 CVE-2026-59176

7.8
CVSS Score
HIGH
2026-10-28
2026-10-28 15:24
✅ 완료

🇰🇷 한글 설명

Functype는 TypeScript 함수형 프로그래밍 라이브러리 모음입니다. 1.4.4 이전 버전의 functype-mcp-server에서 set_functype_version MCP 도구가 version 값을 검증 없이 pnpm add 명령에 삽입하여, 임의의 패키지를 설치하고 그 코드가 MCP 서버 권한으로 실행될 수 있습니다. 인증 없이 호출 가능하며 간접 프롬프트 인젝션으로도 악용될 수 있습니다.

💡 쉬운 설명

AI 도구가 사용하는 서버에 악성 코드를 설치해 실행하게 만들 수 있는 취약점입니다. 공격자는 이를 통해 서버의 비밀 정보를 읽거나 파일을 변경하고 서버를 중단시킬 수 있습니다.

🇺🇸 원문 (English)

Functype is a family of TypeScript functional programming libraries. Prior to 1.4.4, the `set_functype_version` MCP tool in `functype-mcp-server` accepts an unconstrained `version` string using only `z.string()` validation in `packages/mcp-server/src/index.ts` and interpolates it into `functype@<version>` for `pnpm add`. Package-alias syntaxes such as `file:`, `npm:`, URLs, or paths can cause an arbitrary local or remote package to be installed as functype. Immediately afterward, `initDocsData(true)` in `packages/mcp-server/src/lib/docs/data.ts` resolves `functype/cli` and dynamically imports the newly installed module, executing attacker-controlled JavaScript with the MCP server process's privileges. Any MCP client able to send a `tools/call` request invoking the tool can exploit the flaw; the tool is enabled by default without authentication in `stdio` mode. A connected AI assistant susceptible to indirect prompt injection can also be induced to invoke it from a malicious document or web page. In non-default `TRANSPORT_TYPE=httpStream` deployments, a network-accessible attacker does not require local access. Successful execution can read process secrets, modify files, or terminate the server. This issue is fixed in `version` 1.4.4.

📍 영향받는 시스템

functype-mcp-server 1.4.4 미만 버전 (기본 stdio 모드 및 TRANSPORT_TYPE=httpStream 배포 환경)

⚔️ 공격 벡터

MCP tools/call 요청으로 set_functype_version 도구를 호출하며 version에 file:, npm:, URL 등 패키지 별칭을 넣어 악성 모듈을 설치·실행시킴 (AI 어시스턴트를 통한 간접 프롬프트 인젝션도 가능)

🛡️ 대응 방법

functype-mcp-server를 1.4.4 이상으로 업데이트하고, 업데이트 전까지 set_functype_version 도구를 비활성화하거나 네트워크 노출을 차단

🔧 검증 코드

출력된 설치 버전이 1.4.4 미만이면 취약하므로 1.4.4 이상으로 업데이트해야 하며, 설치되어 있지 않으면 해당 패키지가 영향받지 않습니다.

Shell / Script
npm ls functype-mcp-server 2>/dev/null; pnpm ls functype-mcp-server 2>/dev/null

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Oracle Java SE