🔍 CVE-2026-71235

8.8
CVSS Score
HIGH
2026-08-05
2026-08-05 13:24
✅ 완료

🇰🇷 한글 설명

Magistrala의 Rules Engine에서 인증된 사용자가 Go 또는 Lua 스크립트를 포함한 규칙을 생성할 수 있는 취약점입니다. Go 엔진은 표준 라이브러리 중 파일 및 네트워크 관련 함수를 제한하지 못하며, Lua 엔진은 입력 검증 없이 데이터베이스, 파일 I/O, SSRF가 가능한 라이브러리를 로드합니다. 이를 통해 권한이 낮은 사용자가 임의 파일 읽기/쓰기, 환경 변수 유출, 데이터베이스 접근 및 내부 서비스 SSRF를 수행할 수 있습니다.

💡 쉬운 설명

로그인한 사용자가 시스템 명령을 실행할 수 있는 코드를 규칙에 몰래 심어 넣을 수 있는 보안 구멍입니다. 이를 통해 해커는 서버의 중요한 파일을 훔치거나 데이터베이스를 조작하고 내부 네트워크를 공격할 수 있습니다.

🇺🇸 원문 (English)

Magistrala's Rules Engine allows authenticated users to create rules with embedded Go or Lua scripts executed server-side when IoT messages arrive. The Go script engine (re/golang.go) runs scripts through the Yaegi interpreter with stdlib.Symbols, exposing the full Go standard library (including os and net/http) with validation limited to a regex blocking goroutines and panic() calls; dangerous functions such as os.ReadFile, os.WriteFile, os.Remove, and os.Environ remain fully accessible. The Lua script engine (re/lua.go) performs no input validation at all and preloads dangerous libraries: db (arbitrary database access), ioutil (file I/O), an HTTP client (SSRF), and filepath (traversal). An authenticated low-privileged user can achieve arbitrary file read/write, environment variable leakage, database access, and SSRF against internal microservices.

📍 영향받는 시스템

Magistrala Rules Engine (Go/Lua 스크립트 실행 기능 활성화 버전)

⚔️ 공격 벡터

인증된 사용자가 악성 Go 또는 Lua 스크립트가 포함된 규칙을 생성하여 서버 측에서 실행 유도

🛡️ 대응 방법

스크립트 엔진의 표준 라이브러리 접근 권한을 최소화하고, Lua 엔진의 위험한 라이브러리 로드를 차단하며, 입력값 검증 로직을 강화하십시오.

🔧 검증 코드

출력 결과에 해당 파일 경로가 나타나면 스크립트 엔진이 존재하며 취약할 가능성이 높습니다.

Shell / Script
grep -rE 're/golang.go|re/lua.go' /path/to/magistrala/source/code

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

UniFi OS Server