🇰🇷 한글 설명
CVE-2025-68161에 대한 수정이 불완전했습니다. 호스트명 검증이 log4j2.sslVerifyHostName 시스템 속성으로 활성화된 경우에만 적용되고, <Ssl> 요소의 verifyHostName 속성으로 설정된 경우에는 무시되어 TLS 연결이 중간자 공격에 노출됩니다. 영향 범위는 SMTP, Socket, Syslog 어펜더이며 HTTP 어펜더는 해당되지 않습니다.
💡 쉬운 설명
로그를 외부로 전송하는 일부 기능에서 보안 연결이 상대 서버의 신원을 제대로 확인하지 않습니다. 공격자가 중간에서 가로채 로그 데이터를 엿보거나 조작할 수 있습니다.
🇺🇸 원문 (English)
The fix for CVE-2025-68161 https://logging.apache.org/security.html#CVE-2025-68161 was incomplete: it addressed hostname verification only when enabled via the log4j2.sslVerifyHostName https://logging.apache.org/log4j/2.x/manual/systemproperties.html#log4j2.sslVerifyHostName system property, but not when configured through the verifyHostName https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostName attribute of the <Ssl> element.
Although the verifyHostName configuration attribute was introduced in Log4j Core 2.12.0, it was silently ignored in all versions through 2.25.3, leaving TLS connections vulnerable to interception regardless of the configured value.
A network-based attacker may be able to perform a man-in-the-middle attack when all of the following conditions are met:
* An SMTP, Socket, or Syslog appender is in use.
* TLS is configured via a nested <Ssl> element.
* The attacker can present a certificate issued by a CA trusted by the appender's configured trust store, or by the default Java trust store if none is configured.
This issue does not affect users of the HTTP appender, which uses a separate verifyHostname https://logging.apache.org/log4j/2.x/manual/appenders/network.html#HttpAppender-attr-verifyHostName attribute that was not subject to this bug and verifies host names by default.
Users are advised to upgrade to Apache Log4j Core 2.25.4, which corrects this issue.
📍 영향받는 시스템
Apache Log4j Core 2.25.3 이하 버전 (SMTP/Socket/Syslog 어펜더에서 <Ssl> 설정 사용 시)
⚔️ 공격 벡터
네트워크상의 공격자가 해당 어펜더의 신뢰 저장소에서 신뢰하는 CA가 발급한 인증서를 제시하여 TLS 연결에 대해 중간자(MITM) 공격을 수행
🛡️ 대응 방법
Apache Log4j Core 2.25.4 이상으로 업그레이드
🔧 검증 코드
출력된 Implementation-Version이 2.25.4 미만이면 취약한 버전이므로 업그레이드가 필요하며, 2.25.4 이상이면 패치가 적용된 것입니다.
find / -name 'log4j-core-*.jar' 2>/dev/null | xargs -I{} sh -c 'echo {}; unzip -p {} META-INF/MANIFEST.MF 2>/dev/null | grep -i implementation-version'