CVE-2021-21353
CVSS V2 Medium 6.8
CVSS V3 Critical 9
Description
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.
Overview
- CVE ID
- CVE-2021-21353
- Assigner
- security-advisories@github.com
- Vulnerability Status
- Analyzed
- Published Version
- 2021-03-03T02:15:13
- Last Modified Date
- 2021-03-09T15:35:21
Weakness Enumerations
CPE Configuration (Product)
CPE | Vulnerable | Operator | Version Start | Version End |
---|---|---|---|---|
cpe:2.3:a:pugjs:pug:*:*:*:*:*:node.js:*:* | 1 | OR | 3.0.1 | |
cpe:2.3:a:pugjs:pug-code-gen:*:*:*:*:*:node.js:*:* | 1 | OR | 2.0.3 | |
cpe:2.3:a:pugjs:pug-code-gen:*:*:*:*:*:node.js:*:* | 1 | OR | 3.0.0 | 3.0.2 |
CVSS Version 2
- Version
- 2.0
- Vector String
- AV:N/AC:M/Au:N/C:P/I:P/A:P
- Access Vector
- NETWORK
- Access Compatibility
- MEDIUM
- Authentication
- NONE
- Confidentiality Impact
- PARTIAL
- Integrity Impact
- PARTIAL
- Availability Impact
- PARTIAL
- Base Score
- 6.8
- Severity
- MEDIUM
- Exploitability Score
- 8.6
- Impact Score
- 6.4
CVSS Version 3
- Version
- 3.1
- Vector String
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
- Attack Vector
- NETWORK
- Attack Compatibility
- HIGH
- Privileges Required
- NONE
- User Interaction
- NONE
- Scope
- CHANGED
- Confidentiality Impact
- HIGH
- Availability Impact
- HIGH
- Base Score
- 9
- Base Severity
- CRITICAL
- Exploitability Score
- 2.2
- Impact Score
- 6
References
Reference URL | Reference Tags |
---|---|
https://github.com/pugjs/pug/pull/3314 | Patch Third Party Advisory |
https://github.com/pugjs/pug/releases/tag/pug%403.0.1 | Release Notes Third Party Advisory |
https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr | Third Party Advisory |
https://github.com/pugjs/pug/issues/3312 | Exploit Patch Third Party Advisory |
https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0 | Patch Third Party Advisory |
https://www.npmjs.com/package/pug | Product Third Party Advisory |
https://www.npmjs.com/package/pug-code-gen | Product Third Party Advisory |
Sources
Source Name | Source URL |
---|---|
NIST | https://nvd.nist.gov/vuln/detail/CVE-2021-21353 |
MITRE | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21353 |
History
Created | Old Value | New Value | Data Type | Notes |
---|---|---|---|---|
2022-05-10 07:20:35 | Added to TrackCVE | |||
2022-12-05 23:01:37 | 2021-03-03T02:15Z | 2021-03-03T02:15:13 | CVE Published Date | updated |
2022-12-05 23:01:37 | 2021-03-09T15:35:21 | CVE Modified Date | updated | |
2022-12-05 23:01:37 | Analyzed | Vulnerability Status | updated |