🇰🇷 한글 설명
Neuron PHP 프레임워크의 MySQLWriteTool에서任意 SQL 실행 취약점
💡 쉬운 설명
Neuron 프레임워크의 MySQLWriteTool에서任意 SQL을 실행할 수 있는 취약점이 발견되었습니다. 이는 데이터베이스에 대한 높은 권한을 가진 사용자에게 심각한 영향을 미칠 수 있습니다. 버전 2.8.11 이하에서 발생하며, 버전 2.8.12에서 수정되었습니다.
🇺🇸 원문 (English)
Neuron is a PHP framework for creating and orchestrating AI Agents. In versions 2.8.11 and below, the MySQLWriteTool executes arbitrary SQL provided by the caller using PDO::prepare() + execute() without semantic restrictions. This is consistent with the name (“write tool”), but in an LLM/agent context it becomes a high-risk capability: prompt injection or indirect prompt manipulation can cause execution of destructive queries such as DROP TABLE, TRUNCATE, DELETE, ALTER, or privilege-related statements (subject to DB permissions). Deployments that expose an agent with MySQLWriteTool enabled to untrusted input and/or run the tool with a DB user that has broad privileges are impacted. This issue is fixed in version 2.8.12.
📍 영향받는 시스템
Neuron PHP 프레임워크 버전 2.8.11 이하
⚔️ 공격 벡터
MySQLWriteTool을 사용하여任意 SQL을 실행
🛡️ 대응 방법
Neuron PHP 프레임워크를 버전 2.8.12 이상으로 업그레이드
🔧 검증 코드
로컬 시스템에서 Python을 사용하여 Neuron 패키지 버전을 확인합니다. Python이 설치되어 있어야 하며, subprocess 모듈을 사용하여 pip 명령어를 실행합니다. 결과는 JSON 형식으로 출력됩니다.
import subprocess
result = subprocess.run(['pip', 'show', 'neuron'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.stdout.decode('utf-8').find('Version: 2.8.11') != -1 or result.stdout.decode('utf-8').find('Version: 2.8.10') != -1:
print('{"result": "취약", "reason": "Neuron 버전이 2.8.11 이하입니다."}')
else:
print('{"result": "양호", "reason": "Neuron 버전이 2.8.12 이상입니다."}')