🇰🇷 한글 설명
Dromara mayfly-go 1.11.5 이하 버전의 Machine Script 기능에서 OS 명령 주입 취약점이 발견되었습니다. machine:script:run 및 tag 권한을 가진 계정이 params 인자를 조작하여 원격으로 임의의 명령을 실행할 수 있습니다. 특히 SSH 실행 계층에서 입력 필터링이 이루어지지 않아 공격이 용이하며 현재 익스플로잇이 공개된 상태입니다.
💡 쉬운 설명
특정 권한을 가진 사용자가 시스템에 몰래 명령어를 입력하여 컴퓨터를 마음대로 조종할 수 있는 보안 구멍이 발견되었습니다. 해커가 이 구멍을 이용해 원격에서 서버에 명령을 내릴 수 있으므로 주의가 필요합니다.
🇺🇸 원문 (English)
A vulnerability was detected in Dromara mayfly-go up to 1.11.5. The impacted element is the function RunMachineScript of the file server/internal/machine/api/machine_script.go of the component Machine Script Feature. The manipulation of the argument params results in os command injection. The attack can be executed remotely. The exploit is now public and may be used. Exploitation needs no admin account. Any account holding machine:script:run plus tag access reaches arbitrary command execution on machines whose templates contain {{.param}} placeholders; the SSH exec layer (Cli.Run) also applies no input filtering to any caller. The vendor was contacted early about this disclosure but did not respond in any way.
📍 영향받는 시스템
Dromara mayfly-go version 1.11.5 and below
⚔️ 공격 벡터
Remote via manipulation of 'params' argument in RunMachineScript function
🛡️ 대응 방법
Update mayfly-go to a patched version or implement strict input validation for machine script parameters
🔧 검증 코드
출력된 버전 번호가 1.11.5 이하인지 확인하여 취약 여부를 판단합니다.
go list -m github.com/dromara/mayfly-go 2>/dev/null | grep -E 'v[0-9]+\.[0-9]+\.[0-9]+'