🇰🇷 한글 설명
Forge(node-forge)는 JavaScript로 구현된 TLS 라이브러리입니다. 1.4.0 이전 버전에서는 pki.verifyCertificateChain()이 basicConstraints와 keyUsage 확장이 모두 없는 중간 인증서에 대해 RFC 5280 요구사항을 검증하지 않아, 해당 리프 인증서가 CA처럼 동작하여 다른 인증서에 서명할 수 있습니다. 이 문제는 1.4.0 버전에서 수정되었습니다.
💡 쉬운 설명
일반 인증서가 권한 없이도 다른 인증서를 발급하는 기관처럼 행동할 수 있는 결함입니다. 이를 악용하면 공격자가 신뢰되는 것처럼 보이는 위조 인증서를 만들 수 있습니다.
🇺🇸 원문 (English)
Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Prior to version 1.4.0, `pki.verifyCertificateChain()` does not enforce RFC 5280 basicConstraints requirements when an intermediate certificate lacks both the `basicConstraints` and `keyUsage` extensions. This allows any leaf certificate (without these extensions) to act as a CA and sign other certificates, which node-forge will accept as valid. Version 1.4.0 patches the issue.
📍 영향받는 시스템
node-forge 1.4.0 미만 버전을 사용하는 Node.js 애플리케이션 및 해당 라이브러리 기반 인증서 검증 시스템
⚔️ 공격 벡터
공격자가 basicConstraints/keyUsage가 없는 리프 인증서를 이용해 하위 인증서에 서명하고, 이를 검증 측이 정상 체인으로 수락하도록 유도
🛡️ 대응 방법
node-forge를 1.4.0 이상으로 업데이트 (npm update node-forge 또는 package.json 수정 후 재설치)
🔧 검증 코드
출력된 버전이 1.4.0 미만이면 취약하므로 업데이트가 필요하며, 1.4.0 이상이면 패치가 적용된 상태입니다.
npm ls node-forge 2>/dev/null | grep -E 'node-forge@'