🇰🇷 한글 설명
Forge(node-forge)는 JavaScript로 구현된 TLS 라이브러리입니다. 1.4.1 이전 버전의 pem.decode()는 END 라인을 찾고 캡슐화된 헤더를 파싱하는 과정에서 다항식 시간 복잡도의 정규표현식을 사용하여, 조작된 PEM 입력이 주어지면 과도한 CPU를 소모할 수 있습니다. 이로 인해 서비스 거부(DoS) 공격이 가능합니다.
💡 쉬운 설명
악의적인 사람이 조작된 인증서 데이터를 보내면 서버의 CPU를 과도하게 사용하게 만들어 서비스가 느려지거나 멈출 수 있습니다. 1.4.1 이상 버전으로 업데이트하면 이 문제가 해결됩니다.
🇺🇸 원문 (English)
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the affected implementation used pem.decode(), lib/pem.js, missing END line to process the relevant input or security decision. node-forge used polynomial-time regular expressions in pem.decode(), including when searching for a matching END line and parsing encapsulated headers. An unauthenticated attacker able to supply PEM input to any high-level parser could consume excessive CPU with a long malformed message and cause denial of service. This issue is fixed in version 1.4.1.
📍 영향받는 시스템
node-forge 1.4.1 미만 버전을 사용하는 Node.js 애플리케이션 및 PEM 파싱 기능을 사용하는 모든 시스템
⚔️ 공격 벡터
인증되지 않은 공격자가 PEM 형식 입력을 제공할 수 있는 고수준 파서에 긴 악성 메시지를 전송하여 CPU 자원을 고갈시킴
🛡️ 대응 방법
node-forge를 1.4.1 이상 버전으로 업데이트 (npm update node-forge 또는 npm install node-forge@^1.4.1)
🔧 검증 코드
출력된 node-forge 버전이 1.4.1 미만이면 취약하므로 업데이트가 필요하고, 1.4.1 이상이면 패치된 상태입니다.
npm ls node-forge 2>/dev/null | grep -E 'node-forge@[0-9]+\.[0-9]+\.[0-9]+'