NVD Vulnerability Detail
Search Exploit, PoC
CVE-2021-21353
Summary

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.

Publication Date March 3, 2021, 11:15 a.m.
Registration Date March 3, 2021, 4:02 p.m.
Last Update Nov. 21, 2024, 2:48 p.m.
CVSS3.1 : CRITICAL
スコア 9.0
Vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
攻撃元区分(AV) ネットワーク
攻撃条件の複雑さ(AC)
攻撃に必要な特権レベル(PR) 不要
利用者の関与(UI) 不要
影響の想定範囲(S) 変更あり
機密性への影響(C)
完全性への影響(I)
可用性への影響(A)
CVSS2.0 : MEDIUM
Score 6.8
Vector AV:N/AC:M/Au:N/C:P/I:P/A:P
攻撃元区分(AV) ネットワーク
攻撃条件の複雑さ(AC)
攻撃前の認証要否(Au) 不要
機密性への影響(C)
完全性への影響(I)
可用性への影響(A)
Get all privileges. いいえ
Get user privileges いいえ
Get other privileges いいえ
User operation required いいえ
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:pugjs:pug:*:*:*:*:*:node.js:*:* 3.0.1
cpe:2.3:a:pugjs:pug-code-gen:*:*:*:*:*:node.js:*:* 3.0.0 3.0.2
cpe:2.3:a:pugjs:pug-code-gen:*:*:*:*:*:node.js:*:* 2.0.3
Related information, measures and tools
Common Vulnerabilities List

JVN Vulnerability Information
pug および pug-code-gen におけるインジェクションに関する脆弱性
Title pug および pug-code-gen におけるインジェクションに関する脆弱性
Summary

pug および pug-code-gen には、インジェクションに関する脆弱性が存在します。

Possible impacts 情報を取得される、情報を改ざんされる、およびサービス運用妨害 (DoS) 状態にされる可能性があります。
Solution

ベンダより正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

Publication Date March 1, 2021, midnight
Registration Date Nov. 10, 2021, 11:50 a.m.
Last Update Nov. 10, 2021, 11:50 a.m.
Affected System
pugjs
pug 3.0.1 未満
pug-code-gen 
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
Change Log
No Changed Details Date of change
1 [2021年11月10日]
  掲載
Nov. 10, 2021, 11:50 a.m.