🇰🇷 한글 설명
gin-vue-admin 2.9.1 버전에서 인증된 공격자가 코드 생성 기능과 MCP 관리 인터페이스를 악용하여 임의의 Go 소스 코드를 주입할 수 있습니다. 이를 통해 MCP 서비스를 재빌드 및 재시작함으로써 서버에서 임의의 운영체제 명령을 실행하는 원격 코드 실행(RCE) 취약점이 발생합니다.
💡 쉬운 설명
프로그램이 코드를 자동으로 만들어주는 기능을 악용해 해커가 몰래 나쁜 명령어를 심을 수 있는 문제입니다. 이 명령어가 실행되면 해커가 서버를 마음대로 조종하거나 데이터를 훔칠 수 있습니다.
🇺🇸 원문 (English)
gin-vue-admin is an AI-assisted basic development platform. In version 2.9.1, an authenticated attacker with access to the code-generation feature and MCP management interface can exploit this vulnerability by injecting attacker-controlled Go source code through POST /autoCode/addFunc, and then invoking POST /autoCode/mcpStart to trigger a rebuild and restart of the standalone MCP service. This allows arbitrary operating system commands to be executed on the server with the privileges of the application process. Successful exploitation may lead to remote code execution (RCE), modification of backend source code or runtime logic, deployment of persistent backdoors, access to or manipulation of application data and configuration, and further impact on local resources running under the same service account or privilege context. The risk is highest in deployments that retain the source tree, allow writes to source files, and support local build or startup of standalone MCP components. In environments using binary-only releases, read-only filesystems, or with local build capabilities removed, the exploitability of the full attack chain is significantly reduced. However, once the online code-generation capability and MCP-hosted startup workflow are enabled, the overall security impact may reach high to critical severity. As of time of publication, it is unknown if a patched version is available. As a workaround, enforce strict allowlist validation on path- and identifier-related fields such as `humpPackageName`, `packageName`, `FuncName`, and `Router`, and only permit safe identifier formats.
📍 영향받는 시스템
gin-vue-admin version 2.9.1
⚔️ 공격 벡터
인증된 사용자가 /autoCode/addFunc를 통해 악성 Go 코드를 주입한 후 /autoCode/mcpStart를 호출하여 실행
🛡️ 대응 방법
humpPackageName, packageName, FuncName, Router 등 식별자 관련 필드에 대해 엄격한 화이트리스트 검증을 적용하십시오.
🔧 검증 코드
해당 API 호출 시 입력값 검증 오류가 발생하지 않고 정상적으로 코드가 추가된다면 취약할 가능성이 높습니다.
curl -s -X POST http://<target_ip>/autoCode/addFunc -d '{"packageName":"test"}' | grep -q 'error'
💻 영향받는 소프트웨어
IBM WebSphere Application Server