🔍 CVE-2026-84308

6.3
CVSS Score
MEDIUM
2026-09-01
2026-09-09 21:09
✅ 완료

🇰🇷 한글 설명

phpseclib의 pure-PHP X25519 스칼라 곱셈 과정에서 데이터에 의존적인 조건부 모듈러 연산이 발생하여 타이밍 공격에 취약합니다. 공격자는 Montgomery ladder 단계의 실행 시간이나 libgmp 호출 횟수를 관찰하여 재사용되는 251비트 비공개 스칼라 값을 알아낼 수 있습니다.

💡 쉬운 설명

암호화 계산을 할 때 걸리는 시간 차이를 이용해 비밀번호와 같은 중요한 암호 키를 훔쳐낼 수 있는 보안 결함입니다. 특정 조건에서 암호 키가 반복 사용될 경우 공격자가 키를 알아낼 위험이 있습니다.

🇺🇸 원문 (English)

phpseclib is a PHP secure communications library. Prior to 3.0.57 and 4.0.1, pure-PHP X25519 scalar multiplication in phpseclib/Math/PrimeField/Integer.php performs data-dependent conditional modular reductions in add() and subtract(). During the Montgomery ladder in phpseclib/Crypt/EC/BaseCurves/Montgomery.php, the reduction behavior of each step depends on the secret scalar prefix, creating per-step timing and libgmp call-count observations that can reveal a reused 251-bit clamped private scalar. The phpseclib/Crypt/EC/Formats/Keys/MontgomeryPrivate.php derivation path invokes the pure-PHP multiplication without a native-engine check, while phpseclib/Crypt/EC/Formats/Keys/PKCS8.php reaches it when ext-sodium is unavailable. Exploitation requires a reused or long-lived X25519 private key, knowledge of the corresponding public key, execution of the pure-PHP path, and a local observer capable of resolving individual ladder steps or libgmp entry-point calls. Ephemeral X25519 keys, including phpseclib's normal SSH exchange path, are not affected. Recovery of the scalar permanently compromises operations that reuse that key. This issue is fixed in versions 3.0.57 and 4.0.1.

📍 영향받는 시스템

phpseclib 3.0.57 미만 및 4.0.1 미만 버전 (ext-sodium이 없는 환경)

⚔️ 공격 벡터

로컬 관찰자가 타이밍 정보나 라이브러리 호출 횟수를 분석하여 재사용되는 X25519 개인키를 탈취

🛡️ 대응 방법

phpseclib를 3.0.57 또는 4.0.1 이상의 최신 버전으로 업데이트하거나 ext-sodium 확장을 활성화하십시오.

🔧 검증 코드

출력된 버전이 3.0.57 미만이거나 4.0.1 미만이면 취약한 상태입니다.

Shell / Script
composer show phpseclib/phpseclib | grep 'versions'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

PHP