🇰🇷 한글 설명
LiquidJS는 순수 JavaScript로 작성된 Shopify/GitHub Pages 호환 템플릿 엔진입니다. 10.25.7 이하 버전에서 Context.spawn()이 {% render %} 태그용 자식 컨텍스트를 생성할 때 부모 컨텍스트의 ownPropertyOnly 값을 전파하지 않아, parseAndRender()에서 지정한 RenderOptions.ownPropertyOnly 재정의가 무시되고 프로토타입 체인 속성이 노출됩니다. 이 문제는 10.26.0 버전에서 수정되었습니다.
💡 쉬운 설명
템플릿 엔진이 보안 설정을 잘못 전달해서, 개발자가 제한한 보안 옵션이 일부 상황에서 무시됩니다. 그 결과 템플릿 내부에서 본래 접근하면 안 되는 객체 속성이 노출될 수 있습니다.
🇺🇸 원문 (English)
LiquidJS is a Shopify/GitHub Pages compatible template engine written in pure JavaScript. In versions 10.25.7 and below, Context.spawn() creates a child Context for the {% render %} tag but does not propagate the parent context's resolved ownPropertyOnly value, resulting in a silent bypass. The new context re-derives ownPropertyOnly from opts.ownPropertyOnly (the instance-level option), silently discarding any RenderOptions.ownPropertyOnly override that was supplied to parseAndRender(). As a result, a developer who runs a Liquid instance with the backwards-compatible ownPropertyOnly:false and then locks down an untrusted render with parseAndRender(..., { ownPropertyOnly: true }) still leaks prototype-chain properties from inside any {% render %} partial. This is a distinct exploit surface from the previously identified array-filter variants (where, reject, group_by, find, find_index, has) — the underlying root cause in Context.spawn() is shared, but {% render %} is a separately reachable sink that needs no filter usage. This issue has been fixed in version 10.26.0.
📍 영향받는 시스템
LiquidJS 10.25.7 이하 버전을 사용하는 Node.js/브라우저 애플리케이션 (특히 {% render %} 태그 사용 시)
⚔️ 공격 벡터
신뢰할 수 없는 사용자 템플릿에서 {% render %} partial을 통해 ownPropertyOnly 제한을 우회하고 프로토타입 체인 속성에 접근
🛡️ 대응 방법
LiquidJS를 10.26.0 이상으로 업그레이드 (npm update liquidjs)
🔧 검증 코드
출력된 버전이 10.26.0 미만이면 취약하므로 업그레이드가 필요하고, 10.26.0 이상이면 수정된 버전입니다.
npm ls liquidjs 2>/dev/null | grep liquidjs