🔍 CVE-2026-33939

7.5
CVSS Score
HIGH
2026-03-27
2026-10-26 22:10
✅ 완료

🇰🇷 한글 설명

Handlebars 4.0.0부터 4.7.8 버전에서 등록되지 않은 데코레이터 구문을 포함한 템플릿을 처리할 때 TypeError가 발생합니다. 이로 인해 Node.js 프로세스가 예기치 않게 종료되어 서비스 거부(DoS) 공격이 가능해집니다.

💡 쉬운 설명

사용자가 입력한 특수한 기호가 포함된 템플릿을 처리하다가 프로그램이 갑자기 멈춰버리는 문제입니다. 공격자가 이 기호를 보내면 웹사이트 서비스가 중단될 수 있습니다.

🇺🇸 원문 (English)

Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, when a Handlebars template contains decorator syntax referencing an unregistered decorator (e.g. `{{*n}}`), the compiled template calls `lookupProperty(decorators, "n")`, which returns `undefined`. The runtime then immediately invokes the result as a function, causing an unhandled `TypeError: ... is not a function` that crashes the Node.js process. Any application that compiles user-supplied templates without wrapping the call in a `try/catch` is vulnerable to a single-request Denial of Service. Version 4.7.9 fixes the issue. Some workarounds are available. Wrap compilation and rendering in `try/catch`. Validate template input before passing it to `compile()`; reject templates containing decorator syntax (`{{*...}}`) if decorators are not used in your application. Use the pre-compilation workflow; compile templates at build time and serve only pre-compiled templates; do not call `compile()` at request time.

📍 영향받는 시스템

Handlebars versions 4.0.0 through 4.7.8

⚔️ 공격 벡터

등록되지 않은 데코레이터 구문(예: {{*n}})이 포함된 사용자 공급 템플릿을 컴파일 시도

🛡️ 대응 방법

Handlebars를 4.7.9 버전 이상으로 업데이트하거나, 템플릿 컴파일 시 try/catch 문을 사용하여 예외 처리를 수행합니다.

🔧 검증 코드

출력 결과에 4.0.0에서 4.7.8 사이의 버전이 나타나면 취약한 상태입니다.

Shell / Script
npm list handlebars | grep -E 'handlebars@4\.[0-4]\.'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Node.js