🇰🇷 한글 설명
Flowintel의 알림 설정 업데이트 엔드포인트에서 사용자가 제공한 구성 키를 적절히 검증하지 않아 발생하는 취약점입니다. 공격자가 조작된 키를 전송하면 Python 설정 파일의 구조를 변경하여 임의의 Python 코드를 실행할 수 있습니다.
💡 쉬운 설명
설정값을 저장하는 과정에서 사용자가 입력한 이름(키)을 그대로 파일에 써버리는 문제입니다. 이를 통해 해커가 악성 명령어를 설정 파일에 몰래 끼워 넣어 시스템을 장악할 수 있습니다.
🇺🇸 원문 (English)
Affected versions of Flowintel improperly trust configuration keys supplied to the alerts settings update endpoint. While configuration values were normalized to Python literals, the corresponding keys were used directly when constructing and replacing lines in conf/config_module.py.
The vulnerable code used requester-controlled keys in both the regular expression and the generated assignment:
f'{key} = {py_val}'
and appended an assignment if the key was not already present. The modified Python configuration module was subsequently reloaded using importlib.reload(). This creates a code-generation boundary in which specially crafted configuration keys can alter the Python source structure and result in execution of attacker-controlled Python statements.
Version impacted >=3.3.0
📍 영향받는 시스템
Flowintel 버전 3.3.0 이상
⚔️ 공격 벡터
알림 설정 업데이트 엔드포인트에 조작된 구성 키를 포함한 요청을 전송하여 코드 주입
🛡️ 대응 방법
해당 취약점이 해결된 최신 버전으로 업데이트하거나, 입력되는 구성 키에 대한 엄격한 화이트리스트 검증 로직을 적용해야 합니다.
🔧 검증 코드
명령어 실행 결과가 3.3.0 이상의 버전 번호를 출력하면 취약한 버전이 설치된 것입니다.
python3 -c 'import flowintel; print(flowintel.__version__)' 2>/dev/null | grep -E '^3\.[3-9]\.|^[4-9]\.'