🇰🇷 한글 설명
고성능 템플릿 엔진인 Pug의 3.0.1 미만 버전에서 발생하는 취약점입니다. 공격자가 pug 컴파일러의 'pretty' 옵션을 제어할 수 있을 경우, Node.js 백엔드에서 원격 코드 실행(RCE)이 가능합니다. 이 문제는 pug 및 pug-code-gen 패키지에 영향을 미칩니다.
💡 쉬운 설명
웹사이트의 화면을 만드는 도구인 Pug의 설정값을 공격자가 마음대로 조작할 수 있는 문제입니다. 이를 통해 해커가 서버에 직접 명령어를 입력하여 시스템을 장악할 수 있습니다.
🇺🇸 원문 (English)
Pug is an npm package which is a high-performance template engine. In pug before version 3.0.1, if a remote attacker was able to control the `pretty` option of the pug compiler, e.g. if you spread a user provided object such as the query parameters of a request into the pug template inputs, it was possible for them to achieve remote code execution on the node.js backend. This is fixed in version 3.0.1. This advisory applies to multiple pug packages including "pug", "pug-code-gen". pug-code-gen has a backported fix at version 2.0.3. This advisory is not exploitable if there is no way for un-trusted input to be passed to pug as the `pretty` option, e.g. if you compile templates in advance before applying user input to them, you do not need to upgrade.
📍 영향받는 시스템
Pug < 3.0.1, pug-code-gen < 2.0.3
⚔️ 공격 벡터
사용자 입력값이 pug 컴파일러의 'pretty' 옵션으로 전달될 때 발생하는 원격 코드 실행(RCE)
🛡️ 대응 방법
Pug를 3.0.1 이상 버전으로, pug-code-gen을 2.0.3 이상 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 결과에서 pug 버전이 3.0.1 미만이거나 pug-code-gen 버전이 2.0.3 미만인지 확인합니다.
npm list pug pug-code-gen