🔍 CVE-2026-61536

7.5
CVSS Score
HIGH
2026-07-30
2026-10-23 22:10
✅ 완료

🇰🇷 한글 설명

Banks 2.4.3 미만 버전에서 템플릿 렌더링 과정 중 Tool JSON 객체의 import_path 필드를 검증 없이 importlib을 통해 실행하는 취약점이 발견되었습니다. 공격자가 조작된 템플릿을 통해 os.system과 같은 임의의 파이썬 속성을 호출할 수 있어, LLM이 특정 도구를 호출할 때 서버에서 임의의 코드가 실행될 수 있습니다. 이는 기존 샌드박스 환경을 우회하여 발생하는 심각한 취약점입니다.

💡 쉬운 설명

AI가 사용하는 도구 설정 파일에 악성 명령어를 숨겨두면, AI가 그 도구를 사용하는 순간 해커가 서버를 마음대로 조종할 수 있는 보안 구멍입니다. 샌드박스라는 보호막을 우회하여 직접 명령어를 실행할 수 있는 위험한 상태입니다.

🇺🇸 원문 (English)

Banks generates meaningful LLM prompts using a simple template language. In versions prior to 2.4.3, banks parses Tool JSON objects from the rendered body of {% completion %} blocks and later resolves their import_path field through importlib.import_module(...) + getattr(...) to obtain the callable that handles a tool call. There is no allowlist or sanitization on import_path, so any importable Python attribute (e.g. os.system, subprocess.getoutput) can be selected. When the LLM emits a tool_calls entry whose function.name matches the attacker-supplied tool name, the resolved callable is invoked with kwargs decoded from tool_call.function.arguments, yielding arbitrary code execution in the banks-hosting process. This is distinct from GHSA-gphh-9q3h-jgpp / CVE-2026-44209. That advisory was fixed in 2.4.2 by switching src/banks/env.py from Environment to SandboxedEnvironment. The fix does not touch src/banks/extensions/completion.py, and the unsafe import + getattr chain still executes on 2.4.2. The malicious Tool JSON is plain text in the rendered template body — it requires no Jinja attribute access, so the sandbox is irrelevant. This issue has been fixed in version 2.4.3.

📍 영향받는 시스템

Banks versions prior to 2.4.3

⚔️ 공격 벡터

조작된 Tool JSON 객체의 import_path 필드에 악성 파이썬 모듈을 삽입하여 LLM 도구 호출 시 실행

🛡️ 대응 방법

Banks 버전을 2.4.3 이상으로 즉시 업데이트하십시오.

🔧 검증 코드

출력된 Version이 2.4.3 미만이면 취약한 상태이며, 2.4.3 이상이면 안전합니다.

Shell / Script
pip show banks 2>/dev/null | grep -E 'Version'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Python