🇰🇷 한글 설명
PHP의 openssl_private_decrypt 함수가 PKCS1 패딩을 사용할 때 Marvin 공격에 취약할 수 있습니다. 이 취약점은 OpenSSL의 rsa_pkcs1_implicit_rejection 패치가 적용되지 않은 환경에서 발생합니다.
💡 쉬운 설명
암호화된 데이터를 해독하는 과정에서 발생하는 보안 결함을 이용해 비밀 정보를 알아낼 수 있는 공격입니다. 최신 보안 패치가 적용된 OpenSSL이나 PHP 버전을 사용해야 안전합니다.
🇺🇸 원문 (English)
The openssl_private_decrypt function in PHP, when using PKCS1 padding (OPENSSL_PKCS1_PADDING, which is the default), is vulnerable to the Marvin Attack unless it is used with an OpenSSL version that includes the changes from this pull request: https://github.com/openssl/openssl/pull/13817 (rsa_pkcs1_implicit_rejection). These changes are part of OpenSSL 3.2 and have also been backported to stable versions of various Linux distributions, as well as to the PHP builds provided for Windows since the previous release. All distributors and builders should ensure that this version is used to prevent PHP from being vulnerable.
PHP Windows builds for the versions 8.1.29, 8.2.20 and 8.3.8 and above include OpenSSL patches that fix the vulnerability.
📍 영향받는 시스템
OpenSSL rsa_pkcs1_implicit_rejection 패치가 적용되지 않은 PHP 환경 (Windows의 경우 8.1.29, 8.2.20, 8.3.8 미만 버전)
⚔️ 공격 벡터
PKCS1 패딩을 사용하는 RSA 복호화 과정에서 발생하는 오류 메시지나 응답 시간 차이를 이용한 부채널 공격(Marvin Attack)
🛡️ 대응 방법
OpenSSL 3.2 이상 또는 해당 패치가 백포트된 최신 버전의 PHP(Windows: 8.1.29, 8.2.20, 8.3.8 이상)로 업데이트
🔧 검증 코드
출력된 PHP 버전이 보안 패치가 포함된 버전(8.1.29, 8.2.20, 8.3.8 이상)인지 확인합니다.
php -r 'echo PHP_VERSION;'