🇰🇷 한글 설명
gin-vue-admin의 플러그인 템플릿 기능에서 plugName 매개변수 조작으로 인한 디렉토리 순회 취약점이 존재합니다. 공격자는 api, config, global, model, router, service 등 특정 폴더를 생성하고 이 폴더 내의 Go 파일에 임의의 코드를 주입할 수 있습니다. 버전 2.6.1 이상에서 패치되었습니다.
💡 쉬운 설명
gin-vue-admin 관리 시스템의 플러그인 기능에서 공격자가 폴더 경로를 조작하여 서버에 악의적인 코드를 심을 수 있습니다. 최신 버전으로 업그레이드하면 해결됩니다.
🇺🇸 원문 (English)
gin-vue-admin is a backstage management system based on vue and gin, which separates the front and rear of the full stack. gin-vue-admin pseudoversion 0.0.0-20240407133540-7bc7c3051067, corresponding to version 2.6.1, has a code injection vulnerability in the backend. In the Plugin System -> Plugin Template feature, an attacker can perform directory traversal by manipulating the `plugName` parameter. They can create specific folders such as `api`, `config`, `global`, `model`, `router`, `service`, and `main.go` function within the specified traversal directory. Moreover, the Go files within these folders can have arbitrary code inserted based on a specific PoC parameter. The main reason for the existence of this vulnerability is the controllability of the PlugName field within the struct. Pseudoversion 0.0.0-20240409100909-b1b7427c6ea6, corresponding to commit b1b7427c6ea6c7a027fa188c6be557f3795e732b, contains a patch for the issue. As a workaround, one may manually use a filtering method available in the GitHub Security Advisory to rectify the directory traversal problem.
📍 영향받는 시스템
gin-vue-admin v2.6.1 이전 버전 (슈도버전 0.0.0-20240407133540-7bc7c3051067 이전)
⚔️ 공격 벡터
Plugin System -> Plugin Template 기능의 plugName 매개변수에 디렉토리 순회 페이로드를 입력하여 임의의 Go 코드 주입
🛡️ 대응 방법
v2.6.1 이상으로 업그레이드 또는 plugName 필드에 대한 입력 검증 필터 적용
🔧 검증 코드
표시된 버전이 0.0.0-20240409100909-b1b7427c6ea6 이후이거나 공식 버전이 2.6.1 이상이면 패치됨
grep -E 'github.com/flipped-aurora/gin-vue-admin' go.mod 2>/dev/null | awk '{print $2}' || echo 'Not found in dependencies'