🔍 CVE-2024-40647

5.3
CVSS Score
MEDIUM
2024-07-18
2026-06-01 08:16
✅ 완료

🇰🇷 한글 설명

Sentry Python SDK 2.8.0 미만 버전의 Stdlib 통합에서 env={} 설정에도 불구하고 모든 환경변수가 서브프로세스로 전달되는 버그입니다. 이로 인해 API 키, 토큰, 데이터베이스 비밀번호 등 민감 정보가 의도하지 않게 자식 프로세스에 노출될 수 있습니다.

💡 쉬운 설명

Sentry 라이브러리가 실수로 자식 프로그램에 모든 환경변수를 전달해서 암호나 토큰 같은 민감 정보가 노출될 수 있습니다. Sentry 라이브러리를 2.8.0 이상으로 업데이트하면 문제가 해결됩니다.

🇺🇸 원문 (English)

sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry's Python SDK < 2.8.0 allows the environment variables to be passed to subprocesses despite the `env={}` setting. In Python's `subprocess` calls, all environment variables are passed to subprocesses by default. However, if you specifically do not want them to be passed to subprocesses, you may use `env` argument in `subprocess` calls. Due to the bug in Sentry SDK, with the Stdlib integration enabled (which is enabled by default), this expectation is not fulfilled, and all environment variables are being passed to subprocesses instead. The issue has been patched in pull request #3251 and is included in sentry-sdk==2.8.0. We strongly recommend upgrading to the latest SDK version. However, if it's not possible, and if passing environment variables to child processes poses a security risk for you, you can disable all default integrations.

📍 영향받는 시스템

sentry-sdk < 2.8.0 (Stdlib integration이 활성화된 모든 Python 애플리케이션)

⚔️ 공격 벡터

악의적인 또는 취약한 서브프로세스가 환경변수 접근을 통해 API 키, DB 비밀번호, 토큰 등 민감 정보를 탈취할 수 있습니다.

🛡️ 대응 방법

sentry-sdk를 2.8.0 이상으로 업그레이드하거나 기본 통합을 비활성화합니다.

🔧 검증 코드

Version 필드에서 2.8.0 이상인지 확인하고, 2.8.0 미만이면 업그레이드 필요합니다.

Shell / Script
pip show sentry-sdk | grep Version || pip3 show sentry-sdk | grep Version

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Python