🇰🇷 한글 설명
QWED-MCP 0.2.1 미만 버전의 math_engine.py 내 verify_math_expression() 함수에서 발생하는 취약점입니다. 공격자가 제어하는 수식이 SymPy의 parse_expr()로 직접 전달되어 Python의 eval()을 통해 임의의 운영체제 명령어를 실행할 수 있는 원격 코드 실행(RCE) 위험이 있습니다.
💡 쉬운 설명
수학 계산을 검증하는 프로그램이 사용자가 입력한 악성 코드를 명령어로 오인하여 실행할 수 있는 보안 구멍이 발견되었습니다. 이를 통해 해커가 컴퓨터를 마음대로 조종하거나 중요한 정보를 훔쳐갈 수 있습니다.
🇺🇸 원문 (English)
QWED-MCP is a deterministic verification gateway for MCP. Prior to 0.2.1, verify_math_expression() in src/qwed_mcp/engines/math_engine.py passes attacker-controlled expression and claimed_result strings directly to SymPy's parse_expr() after only normalizing caret syntax to Python exponent syntax, without restricting global_dict, removing Python built-ins, or validating the expression AST. Because parse_expr() calls Python's eval() with built-ins available, an attacker who can cause a downstream caller to pass untrusted input to this public library function can use Python import functionality to execute arbitrary operating-system commands as the qwed-mcp process user, read or modify accessible data, exfiltrate process secrets, or reach internal services. The default MCP tool registry does not expose verify_math_expression(), so exploitation requires a downstream integration that invokes the library API with attacker-controlled input. This issue is fixed in version 0.2.1.
📍 영향받는 시스템
QWED-MCP 버전 0.2.1 미만
⚔️ 공격 벡터
신뢰할 수 없는 입력값이 포함된 수식을 라이브러리 API에 전달하여 Python 내장 함수를 통한 임의 코드 실행
🛡️ 대응 방법
QWED-MCP를 최신 버전인 0.2.1 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 Version 값이 0.2.1보다 낮으면 취약한 상태이며, 0.2.1 이상이면 안전합니다.
pip show qwed-mcp 2>/dev/null | grep -E 'Version'
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
IBM Security Verify Access