{"id":"EUVD-2021-0685","revision":null,"records":[{"revision":"81ce4f7cd7ef40daa9fce1b8b9f8eb2b","observedAt":"2026-11-02T18:57:17.117+00:00","statement":{"source":"cve-program","id":"CVE-2021-21353","aliases":[],"title":"Remote code execution in pug","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.","state":0,"publishedAt":"2021-03-03T01:50:18+00:00","modifiedAt":"2026-11-02T17:59:55.421+00:00","affected":[{"ecosystem":"Vendor product","name":"pug","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"pugjs\",\n                    \"product\": \"pug\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 3.0.1\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","score":6.8,"severity":"MEDIUM"}],"references":["https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr","https://github.com/pugjs/pug/issues/3312","https://github.com/pugjs/pug/pull/3314","https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0","https://github.com/pugjs/pug/releases/tag/pug%403.0.1","https://www.npmjs.com/package/pug","https://www.npmjs.com/package/pug-code-gen"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2021-21353","license":"CVE Program Terms of Use","key":"cve-program:CVE-2021-21353","identifiers":["CVE-2021-21353"]},"retained":false,"historicalAffected":[]},{"revision":"fdf200f2dc84430c8bfee64264632145","observedAt":"2026-11-18T01:43:02.474+00:00","statement":{"source":"euvd","id":"EUVD-2021-0685","aliases":["CVE-2021-21353","GHSA-p493-635q-r6gr"],"title":"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 p…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","score":6.8,"severity":null}],"references":["https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr","https://github.com/pugjs/pug/issues/3312","https://github.com/pugjs/pug/pull/3314","https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0","https://github.com/pugjs/pug/releases/tag/pug%403.0.1","https://www.npmjs.com/package/pug","https://www.npmjs.com/package/pug-code-gen"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2021-0685","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Mar 3, 2021, 1:50:18 AM","dateUpdated":"Nov 2, 2026, 5:59:55 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2021-0685","identifiers":["EUVD-2021-0685","CVE-2021-21353","GHSA-p493-635q-r6gr"]},"retained":false,"historicalAffected":[]},{"revision":"811a0bbd2eef45b89f14773a6cfa4da9","observedAt":"2026-11-03T20:59:30.157+00:00","statement":{"source":"nvd","id":"CVE-2021-21353","aliases":[],"title":"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 p…","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.","state":0,"publishedAt":"2021-03-03T02:15:13.143+00:00","modifiedAt":"2026-11-02T18:18:32.957+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","score":6.8,"severity":"MEDIUM"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","score":9,"severity":"CRITICAL"},{"system":"CVSS 2.0 · nvd@nist.gov · Primary","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","score":6.8,"severity":"MEDIUM"}],"references":["https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0","https://github.com/pugjs/pug/issues/3312","https://github.com/pugjs/pug/pull/3314","https://github.com/pugjs/pug/releases/tag/pug%403.0.1","https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr","https://www.npmjs.com/package/pug","https://www.npmjs.com/package/pug-code-gen"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2021-21353","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-74","CWE-94"],"productCriteria":["cpe:2.3:a:pugjs:pug:*:*:*:*:*:node.js:*:*","cpe:2.3:a:pugjs:pug-code-gen:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2021-03-03T02:15:13.143","lastModified":"2026-11-02T18:18:32.957"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2021-21353","identifiers":["CVE-2021-21353"]},"retained":false,"historicalAffected":[]},{"revision":"3e8e7379606642ffab3b7280fbcb477e","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-p493-635q-r6gr","aliases":["CVE-2021-21353"],"title":"Remote code execution via the `pretty` option.","description":"### Impact\n\nIf 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.\n\n### Patches\n\nUpgrade to `pug@3.0.1` or `pug-code-gen@3.0.2` or `pug-code-gen@2.0.3`, which correctly sanitise the parameter.\n\n### Workarounds\n\nIf 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.\n\n### References\n\n\nOriginal report: https://github.com/pugjs/pug/issues/3312\n\n### For more information\n\nIf you believe you have found other vulnerabilities, please **DO NOT** open an issue. Instead, you can follow the instructions in our [Security Policy](https://github.com/pugjs/pug/blob/master/SECURITY.md)","state":0,"publishedAt":"2021-03-03T02:03:52+00:00","modifiedAt":"2026-09-10T03:49:14.371503+00:00","affected":[{"ecosystem":"npm","name":"pug","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.0.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"pug-code-gen","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.0.3"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"pug-code-gen","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"3.0.0"},{"kind":"fixed","version":"3.0.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr","https://nvd.nist.gov/vuln/detail/CVE-2021-21353","https://github.com/pugjs/pug/issues/3312","https://github.com/pugjs/pug/pull/3314","https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0","https://github.com/pugjs/pug/releases/tag/pug%403.0.1","https://www.npmjs.com/package/pug","https://www.npmjs.com/package/pug-code-gen"],"sourceUrl":"https://github.com/advisories/GHSA-p493-635q-r6gr","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-p493-635q-r6gr","identifiers":["GHSA-p493-635q-r6gr","CVE-2021-21353"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-19T06:24:22.7088152+00:00","complete":true,"records":1786,"lastAttemptAt":"2026-11-19T06:24:22.7088152+00:00","lastSuccessAt":"2026-11-19T06:24:22.8754391+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:24:22.8754399+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-e55c589538e0700b45c7d6d41fe1447a79199283262c371c864535c791a040b9-42f061bddbd482fb0fdcbfdaef32a6fe691ccebc959e217807f38a7ec448390c","complete":true,"records":428247,"lastAttemptAt":"2026-11-19T06:22:43.7183085+00:00","lastSuccessAt":"2026-11-19T06:22:43.6605476+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:22:43.7183085+00:00","snapshotPublishedAt":"2026-11-19T05:24:53+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-604c3ef60bce4060892183603956d74b","complete":false,"records":13861,"lastAttemptAt":"2026-11-19T06:29:41.1858687+00:00","lastSuccessAt":"2026-11-19T06:29:41.2479169+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:29:41.2479169+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-19T06:24:22.7088152+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-19T06:24:22.7088152+00:00","lastSuccessAt":"2026-11-19T06:24:22.8762559+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:24:22.8762561+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-84b4b212d7ef41cb9ec24b71e9d8e5d8","complete":true,"records":13873,"lastAttemptAt":"2026-11-19T06:24:23.3874789+00:00","lastSuccessAt":"2026-11-19T04:24:39.391+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:39.391+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13908,"expectedIdentifiers":13908,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-76574c95b6792d47ba90af64983ed5843633f14426346d676016e94a5f383202","complete":true,"records":9963,"lastAttemptAt":"2026-11-19T06:24:22.665091+00:00","lastSuccessAt":"2026-11-19T01:24:31.4213722+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:24:22.665091+00:00","snapshotPublishedAt":"2026-11-19T01:03:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-19T06:22:43.8470822+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:22:43.8470822+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-c0d9c71c6fa06d617f979e7bec0d97aca70ca5aea1558184002f8e44516f2fac","complete":true,"records":3177,"lastAttemptAt":"2026-11-19T06:24:22.6784424+00:00","lastSuccessAt":"2026-11-18T21:25:09.5127964+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:24:22.6784424+00:00","snapshotPublishedAt":"2026-11-18T21:18:06+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-79ba98249fc096fffe991a6a897ec91d79aa0bbce455566e233ea218d4eb3d8e","complete":true,"records":232711,"lastAttemptAt":"2026-11-19T06:24:22.5400107+00:00","lastSuccessAt":"2026-11-19T06:24:21.5299094+00:00","error":null,"lastVerifiedAt":"2026-11-19T06:24:22.5400107+00:00","snapshotPublishedAt":"2026-11-19T05:48:03+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}