🇰🇷 한글 설명
hexpm hex_core의 부적절한 인증서 검증 취약점으로 인해, HTTPS 연결을 가로챌 수 있는 공격자가 hex.pm 또는 기타 저장소를 사칭할 수 있습니다. 이 문제는 Erlang/OTP 24 또는 CA 인증서를 로드할 수 없는 OTP 25 환경에서 hex_core의 기본 HTTP 어댑터를 사용할 때 발생합니다.
💡 쉬운 설명
인터넷 연결 시 상대방이 진짜인지 확인하는 '신분증 검사' 과정이 생략되는 문제입니다. 이로 인해 해커가 가짜 사이트를 진짜처럼 속여서 위험한 프로그램을 내려받게 만들 수 있습니다.
🇺🇸 원문 (English)
Improper Certificate Validation vulnerability in hexpm hex_core allows an attacker who can intercept HTTPS connections to impersonate hex.pm, repo.hex.pm or any other repository or API server to programs that use hex_core's default HTTP adapter on Erlang/OTP 24, or on OTP 25 when the operating system's CA certificates can't be loaded.
hex_core:default_config/0 selects the built-in hex_http_httpc adapter. For an HTTPS request whose adapter config has no ssl option, hex_http_httpc:http_options/2 builds options that verify the server certificate against public_key:cacerts_get/0. When that call raises, the adapter prints a warning and sends the request without ssl options, so httpc uses the defaults of the ssl application, which before OTP 26 don't verify the server certificate. public_key:cacerts_get/0 doesn't exist on OTP 24, so every HTTPS request falls back there, and on OTP 25 it raises when no CA store is found. hex_core versions before 0.11.0 never set ssl options, so they don't verify the server certificate on OTP 25 and earlier whether or not a CA store is found.
The fallback was intended and documented, but the documentation didn't make clear that it meant no certificate verification. Since hex_core 0.8.2 the README has warned that the built-in httpc adapter "has insecure default settings" and recommended other HTTP clients, and the adapter prints "using default ssl options which are insecure" on every request that falls back. hex_core 0.11.0 added certificate verification with the changelog entry "Use secure SSL defaults for OTP 25+". Neither the README nor the warning says that the server certificate isn't verified, the README doesn't say which OTP versions the warning applies to, and on OTP 25 without CA certificates the warning tells users to upgrade to OTP 25 or later, which they already run. This advisory is published so that users who took those notices as general advice know their HTTPS requests weren't authenticated.
This issue affects hex_core: from 0.1.0 before 0.20.0.
📍 영향받는 시스템
hex_core versions 0.1.0 to 0.19.x (before 0.20.0)
⚔️ 공격 벡터
HTTPS 연결을 가로채는 중간자 공격(Man-in-the-Middle)을 통해 서버를 사칭함
🛡️ 대응 방법
hex_core를 0.20.0 이상의 버전으로 업데이트하거나, 보안이 강화된 다른 HTTP 클라이언트를 사용하십시오.
🔧 검증 코드
출력된 hex_core의 버전이 0.20.0 미만인지 확인하십시오.
mix list_packages | grep hex_core || echo 'hex_core not found'
💻 영향받는 소프트웨어
IBM WebSphere Application Server