gsd-2021-21353
Vulnerability from gsd
Modified
2023-12-13 01:23
Details
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.
Aliases
Aliases
{ "GSD": { "alias": "CVE-2021-21353", "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.", "id": "GSD-2021-21353" }, "gsd": { "metadata": { "exploitCode": "unknown", "remediation": "unknown", "reportConfidence": "confirmed", "type": "vulnerability" }, "osvSchema": { "aliases": [ "CVE-2021-21353" ], "details": "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.", "id": "GSD-2021-21353", "modified": "2023-12-13T01:23:10.772158Z", "schema_version": "1.4.0" } }, "namespaces": { "cve.org": { "CVE_data_meta": { "ASSIGNER": "security-advisories@github.com", "ID": "CVE-2021-21353", "STATE": "PUBLIC", "TITLE": "Remote code execution in pug" }, "affects": { "vendor": { "vendor_data": [ { "product": { "product_data": [ { "product_name": "pug", "version": { "version_data": [ { "version_value": "\u003c 3.0.1" } ] } } ] }, "vendor_name": "pugjs" } ] } }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "eng", "value": "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." } ] }, "impact": { "cvss": { "attackComplexity": "HIGH", "attackVector": "NETWORK", "availabilityImpact": "NONE", "baseScore": 6.8, "baseSeverity": "MEDIUM", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "privilegesRequired": "NONE", "scope": "CHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N", "version": "3.1" } }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "eng", "value": "CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component (\u0027Injection\u0027)" } ] } ] }, "references": { "reference_data": [ { "name": "https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr", "refsource": "CONFIRM", "url": "https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr" }, { "name": "https://github.com/pugjs/pug/issues/3312", "refsource": "MISC", "url": "https://github.com/pugjs/pug/issues/3312" }, { "name": "https://github.com/pugjs/pug/pull/3314", "refsource": "MISC", "url": "https://github.com/pugjs/pug/pull/3314" }, { "name": "https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0", "refsource": "MISC", "url": "https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0" }, { "name": "https://github.com/pugjs/pug/releases/tag/pug%403.0.1", "refsource": "MISC", "url": "https://github.com/pugjs/pug/releases/tag/pug%403.0.1" }, { "name": "https://www.npmjs.com/package/pug", "refsource": "MISC", "url": "https://www.npmjs.com/package/pug" }, { "name": "https://www.npmjs.com/package/pug-code-gen", "refsource": "MISC", "url": "https://www.npmjs.com/package/pug-code-gen" } ] }, "source": { "advisory": "GHSA-p493-635q-r6gr", "discovery": "UNKNOWN" } }, "gitlab.com": { "advisories": [ { "affected_range": "\u003c2.0.3||\u003e=3.0.0 \u003c3.0.2", "affected_versions": "All versions before 2.0.3, all versions starting from 3.0.0 before 3.0.2", "cvss_v2": "AV:N/AC:M/Au:N/C:P/I:P/A:P", "cvss_v3": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H", "cwe_ids": [ "CWE-1035", "CWE-74", "CWE-937" ], "date": "2021-03-09", "description": "Pug is an npm package which is a high-performance template engine.This advisory applies to multiple pug packages including `pug`, `pug-code-gen`.", "fixed_versions": [ "2.0.3", "3.0.2" ], "identifier": "CVE-2021-21353", "identifiers": [ "CVE-2021-21353", "GHSA-p493-635q-r6gr" ], "not_impacted": "All versions starting from 2.0.3 before 3.0.0, all versions starting from 3.0.2", "package_slug": "npm/pug-code-gen", "pubdate": "2021-03-03", "solution": "Upgrade to versions 2.0.3, 3.0.2 or above.", "title": "Injection Vulnerability", "urls": [ "https://nvd.nist.gov/vuln/detail/CVE-2021-21353" ], "uuid": "b90511d7-4baa-4aeb-b198-22349457913a" }, { "affected_range": "\u003c3.0.1", "affected_versions": "All versions before 3.0.1", "cvss_v2": "AV:N/AC:M/Au:N/C:P/I:P/A:P", "cvss_v3": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H", "cwe_ids": [ "CWE-1035", "CWE-74", "CWE-937" ], "date": "2021-03-09", "description": "Pug is susceptiple to injection vulnerability attacks.", "fixed_versions": [ "3.0.1" ], "identifier": "CVE-2021-21353", "identifiers": [ "CVE-2021-21353", "GHSA-p493-635q-r6gr" ], "not_impacted": "All versions starting from 3.0.1", "package_slug": "npm/pug", "pubdate": "2021-03-03", "solution": "Upgrade to version 3.0.1 or above.", "title": "Injection Vulnerability", "urls": [ "https://nvd.nist.gov/vuln/detail/CVE-2021-21353" ], "uuid": "0675881e-27e1-4b28-84bb-249cc18e68e8" } ] }, "nvd.nist.gov": { "configurations": { "CVE_data_version": "4.0", "nodes": [ { "children": [], "cpe_match": [ { "cpe23Uri": "cpe:2.3:a:pugjs:pug:*:*:*:*:*:node.js:*:*", "cpe_name": [], "versionEndExcluding": "3.0.1", "vulnerable": true }, { "cpe23Uri": "cpe:2.3:a:pugjs:pug-code-gen:*:*:*:*:*:node.js:*:*", "cpe_name": [], "versionEndExcluding": "2.0.3", "vulnerable": true }, { "cpe23Uri": "cpe:2.3:a:pugjs:pug-code-gen:*:*:*:*:*:node.js:*:*", "cpe_name": [], "versionEndExcluding": "3.0.2", "versionStartIncluding": "3.0.0", "vulnerable": true } ], "operator": "OR" } ] }, "cve": { "CVE_data_meta": { "ASSIGNER": "security-advisories@github.com", "ID": "CVE-2021-21353" }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "en", "value": "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." } ] }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "en", "value": "CWE-74" } ] } ] }, "references": { "reference_data": [ { "name": "https://github.com/pugjs/pug/pull/3314", "refsource": "MISC", "tags": [ "Patch", "Third Party Advisory" ], "url": "https://github.com/pugjs/pug/pull/3314" }, { "name": "https://github.com/pugjs/pug/releases/tag/pug%403.0.1", "refsource": "MISC", "tags": [ "Release Notes", "Third Party Advisory" ], "url": "https://github.com/pugjs/pug/releases/tag/pug%403.0.1" }, { "name": "https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr", "refsource": "CONFIRM", "tags": [ "Third Party Advisory" ], "url": "https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr" }, { "name": "https://github.com/pugjs/pug/issues/3312", "refsource": "MISC", "tags": [ "Exploit", "Patch", "Third Party Advisory" ], "url": "https://github.com/pugjs/pug/issues/3312" }, { "name": "https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0", "refsource": "MISC", "tags": [ "Patch", "Third Party Advisory" ], "url": "https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0" }, { "name": "https://www.npmjs.com/package/pug", "refsource": "MISC", "tags": [ "Product", "Third Party Advisory" ], "url": "https://www.npmjs.com/package/pug" }, { "name": "https://www.npmjs.com/package/pug-code-gen", "refsource": "MISC", "tags": [ "Product", "Third Party Advisory" ], "url": "https://www.npmjs.com/package/pug-code-gen" } ] } }, "impact": { "baseMetricV2": { "acInsufInfo": false, "cvssV2": { "accessComplexity": "MEDIUM", "accessVector": "NETWORK", "authentication": "NONE", "availabilityImpact": "PARTIAL", "baseScore": 6.8, "confidentialityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "vectorString": "AV:N/AC:M/Au:N/C:P/I:P/A:P", "version": "2.0" }, "exploitabilityScore": 8.6, "impactScore": 6.4, "obtainAllPrivilege": false, "obtainOtherPrivilege": false, "obtainUserPrivilege": false, "severity": "MEDIUM", "userInteractionRequired": false }, "baseMetricV3": { "cvssV3": { "attackComplexity": "HIGH", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "baseScore": 9.0, "baseSeverity": "CRITICAL", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "NONE", "scope": "CHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H", "version": "3.1" }, "exploitabilityScore": 2.2, "impactScore": 6.0 } }, "lastModifiedDate": "2021-03-09T15:35Z", "publishedDate": "2021-03-03T02:15Z" } } }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…