{"id":"CVE-2021-21353","aliases":["DHI-h7sd-czag-mlsp-li3n","GHSA-p493-635q-r6gr"],"summary":"Remote code execution in pug","published_at":"2021-02-28T00:00:00Z","modified_at":"2026-11-19T19:00:22.964888Z","products":[],"rating":{"severity":"critical","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","attack_path":"internet_unauthenticated","user_interaction":false,"malicious":false,"red_hat":"Moderate","vendor_ratings":[{"source":"Red Hat","rating":"Moderate"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.04269000142812729,"percentile":0.9128900170326233,"date":"2026-11-19T00:00:00Z"},"priority":11,"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.","affected_stack":[],"affected_other":[{"ecosystem":"CVE","package":"pugjs/pug","versions":["< 3.0.1"],"provider":"cvelistv5","source":"CVE-2021-21353","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.23","package":"gitlab-workhorse","purl":"pkg:apk/dhi/gitlab-workhorse","versions":["19.1.10-r0","19.1.2-r0","19.1.2-r1","19.1.2-r2","19.1.2-r3","19.1.4-r0","19.1.4-r1","19.1.4-r2","19.1.6-r0","19.1.6-r1","19.1.7-r0","19.1.7-r1","19.1.7-r2","19.1.7-r3","19.1.8-r0","19.1.8-r1","19.1.8-r2","19.1.8-r3","19.1.9-r0","19.1.9-r1","19.1.9-r2","19.5.3-r0","19.5.3-r1","19.5.3-r2","19.5.4-r0","19.5.4-r1","19.5.5-r0","19.5.5-r1","19.5.6-r0"],"provider":"osv","source":"DHI-h7sd-czag-mlsp-li3n","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.23","package":"gitlab-workhorse-fips","purl":"pkg:apk/dhi/gitlab-workhorse-fips","versions":["19.1.10-r0","19.1.2-r0","19.1.2-r1","19.1.2-r2","19.1.2-r3","19.1.4-r0","19.1.4-r1","19.1.4-r2","19.1.6-r0","19.1.6-r1","19.1.7-r0","19.1.7-r1","19.1.7-r2","19.1.7-r3","19.1.8-r0","19.1.8-r1","19.1.8-r2","19.1.8-r3","19.1.9-r0","19.1.9-r1","19.1.9-r2","19.5.3-r0","19.5.3-r1","19.5.3-r2","19.5.4-r0","19.5.4-r1","19.5.5-r0","19.5.5-r1","19.5.6-r0"],"provider":"osv","source":"DHI-h7sd-czag-mlsp-li3n","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"gitlab-rails-18","purl":"pkg:apk/dhi/gitlab-rails-18","versions":["18.11.11-r0","18.11.11-r1","18.11.11-r2","18.11.12-r0","18.11.12-r1","18.11.12-r2","18.11.12-r3","18.11.12-r4","18.11.14-r0","18.11.14-r1","18.11.14-r10","18.11.14-r11","18.11.14-r12","18.11.14-r2","18.11.14-r3","18.11.14-r4","18.11.14-r5","18.11.14-r6","18.11.14-r7","18.11.14-r8","18.11.14-r9"],"provider":"osv","source":"DHI-h7sd-czag-mlsp-li3n","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"gitlab-rails-19","purl":"pkg:apk/dhi/gitlab-rails-19","versions":["19.1.8-r0","19.1.8-r1","19.4.1-r0","19.4.1-r1","19.4.1-r2","19.4.1-r3","19.4.2-r0","19.5.3-r0","19.5.3-r1","19.5.3-r2","19.5.3-r3","19.5.3-r4","19.5.3-r5","19.5.3-r6","19.5.3-r7","19.5.3-r8","19.5.4-r0","19.5.4-r1","19.5.5-r0","19.5.5-r1","19.5.5-r2","19.5.6-r0","19.5.6-r1","19.6.0-r0"],"provider":"osv","source":"DHI-h7sd-czag-mlsp-li3n","relation":"self"},{"ecosystem":"Docker Hardened Images:Debian:13","package":"gitlab-rails-18","purl":"pkg:deb/dhi/gitlab-rails-18","versions":["18.11.11-0","18.11.11-1","18.11.11-2","18.11.12-0","18.11.12-1","18.11.12-2","18.11.14-0","18.11.14-1","18.11.14-10","18.11.14-11","18.11.14-12","18.11.14-13","18.11.14-14","18.11.14-15","18.11.14-16","18.11.14-17","18.11.14-18","18.11.14-19","18.11.14-2","18.11.14-20","18.11.14-21","18.11.14-22","18.11.14-23","18.11.14-24","18.11.14-25","18.11.14-26","18.11.14-27","18.11.14-28","18.11.14-29","18.11.14-3","18.11.14-4","18.11.14-5","18.11.14-6","18.11.14-7","18.11.14-8","18.11.14-9"],"provider":"osv","source":"DHI-h7sd-czag-mlsp-li3n","relation":"self"},{"ecosystem":"Docker Hardened Images:Debian:13","package":"gitlab-rails-19","purl":"pkg:deb/dhi/gitlab-rails-19","versions":["19.1.8-0","19.1.8-1","19.4.1-0","19.4.1-1","19.4.1-2","19.4.2-0","19.5.3-0","19.5.3-1","19.5.3-2","19.5.3-3","19.5.3-4","19.5.3-5","19.5.3-6","19.5.3-7","19.5.3-8","19.5.3-9","19.5.4-0","19.5.4-1","19.5.5-0","19.5.5-1","19.5.5-10","19.5.5-11","19.5.5-2","19.5.5-3","19.5.5-4","19.5.5-5","19.5.5-6","19.5.5-7","19.5.5-8","19.5.5-9","19.5.6-0","19.5.6-1","19.5.6-2","19.5.6-3","19.5.6-4","19.5.6-5","19.6.0-0","19.6.0-1"],"provider":"osv","source":"DHI-h7sd-czag-mlsp-li3n","relation":"self"},{"ecosystem":"NVD","package":"pugjs:pug","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.0.1"}]}],"fixed":["3.0.1"],"provider":"nvd","source":"CVE-2021-21353","relation":"self"},{"ecosystem":"NVD","package":"pugjs:pug-code-gen","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.3"}]},{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.0.2"}]}],"fixed":["2.0.3","3.0.2"],"provider":"nvd","source":"CVE-2021-21353","relation":"self"},{"ecosystem":"TuxCare:npm","package":"pug","purl":"pkg:npm/pug","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.4-tuxcare.0"},{"fixed":"2.0.4-tuxcare.4"}]}],"versions":["2.0.4","2.0.4-tuxcare.1","2.0.4-tuxcare.2","2.0.4-tuxcare.3"],"fixed":["2.0.4-tuxcare.4"],"provider":"osv","source":"CLSA-2026-1777250300","relation":"upstream"},{"ecosystem":"npm","package":"pug","purl":"pkg:npm/pug","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.0.1"}]}],"fixed":["3.0.1"],"provider":"osv","source":"GHSA-p493-635q-r6gr","relation":"self"},{"ecosystem":"npm","package":"pug-code-gen","purl":"pkg:npm/pug-code-gen","ranges":[{"type":"SEMVER","events":[{"introduced":"3.0.0"},{"fixed":"3.0.2"}]}],"fixed":["3.0.2"],"provider":"osv","source":"GHSA-p493-635q-r6gr","relation":"self"},{"ecosystem":"npm","package":"pug-code-gen","purl":"pkg:npm/pug-code-gen","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.3"}]}],"fixed":["2.0.3"],"provider":"osv","source":"GHSA-p493-635q-r6gr","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","cpe":"cpe:/a:redhat:logging:5","status":"affected","packages":["openshift-logging/kibana6-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"Affected","provider":"redhat-vex","source":"CVE-2021-21353"}],"records":[{"provider":"osv","source_id":"CLSA-2026-1777250300","relation":"upstream","url":"https://osv.dev/vulnerability/CLSA-2026-1777250300","published_at":"2026-08-04T14:52:28Z","modified_at":"2026-10-30T19:45:54.349637Z","summary":"TuxCare security update for pug (2 CVEs)","details":"TuxCare rebuilt pug to address 2 CVEs. Fixed in 2.0.4-tuxcare.4.","severity":[],"affected":[{"ecosystem":"TuxCare:npm","package":"pug","purl":"pkg:npm/pug","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.4-tuxcare.0"},{"fixed":"2.0.4-tuxcare.4"}]}],"versions":["2.0.4","2.0.4-tuxcare.1","2.0.4-tuxcare.2","2.0.4-tuxcare.3"],"fixed":["2.0.4-tuxcare.4"],"provider":"osv","source":"CLSA-2026-1777250300","relation":"upstream"}],"product_status":[],"references":[]},{"provider":"cvelistv5","source_id":"CVE-2021-21353","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2021-21353","license":"CC-BY-4.0","published_at":"2021-03-03T01:50:18Z","modified_at":"2026-11-02T17:59:55.421Z","summary":"Remote code execution in pug","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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","source":"CVE-2021-21353"}],"affected":[{"ecosystem":"CVE","package":"pugjs/pug","versions":["< 3.0.1"],"provider":"cvelistv5","source":"CVE-2021-21353","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr"},{"type":"WEB","url":"https://github.com/pugjs/pug/issues/3312"},{"type":"WEB","url":"https://github.com/pugjs/pug/pull/3314"},{"type":"WEB","url":"https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0"},{"type":"WEB","url":"https://github.com/pugjs/pug/releases/tag/pug%403.0.1"},{"type":"WEB","url":"https://www.npmjs.com/package/pug"},{"type":"WEB","url":"https://www.npmjs.com/package/pug-code-gen"}]},{"provider":"nvd","source_id":"CVE-2021-21353","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21353","severity":[],"affected":[{"ecosystem":"NVD","package":"pugjs:pug","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.0.1"}]}],"fixed":["3.0.1"],"provider":"nvd","source":"CVE-2021-21353","relation":"self"},{"ecosystem":"NVD","package":"pugjs:pug-code-gen","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.3"}]},{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.0.2"}]}],"fixed":["2.0.3","3.0.2"],"provider":"nvd","source":"CVE-2021-21353","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"DHI-h7sd-czag-mlsp-li3n","relation":"self","url":"https://osv.dev/vulnerability/DHI-h7sd-czag-mlsp-li3n","license":"Apache-2.0","published_at":"2026-11-10T18:00:27Z","modified_at":"2026-11-19T19:00:22.964888Z","summary":"Pug is an npm package which is a high-performance template engine.  In pug before version 3.0.1, if a remote attacker…","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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","source":"DHI-h7sd-czag-mlsp-li3n"}],"affected":[{"ecosystem":"Docker Hardened Images:Alpine:3.23","package":"gitlab-workhorse","purl":"pkg:apk/dhi/gitlab-workhorse","versions":["19.1.10-r0","19.1.2-r0","19.1.2-r1","19.1.2-r2","19.1.2-r3","19.1.4-r0","19.1.4-r1","19.1.4-r2","19.1.6-r0","19.1.6-r1","19.1.7-r0","19.1.7-r1","19.1.7-r2","19.1.7-r3","19.1.8-r0","19.1.8-r1","19.1.8-r2","19.1.8-r3","19.1.9-r0","19.1.9-r1","19.1.9-r2","19.5.3-r0","19.5.3-r1","19.5.3-r2","19.5.4-r0","19.5.4-r1","19.5.5-r0","19.5.5-r1","19.5.6-r0"],"provider":"osv","source":"DHI-h7sd-czag-mlsp-li3n","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.23","package":"gitlab-workhorse-fips","purl":"pkg:apk/dhi/gitlab-workhorse-fips","versions":["19.1.10-r0","19.1.2-r0","19.1.2-r1","19.1.2-r2","19.1.2-r3","19.1.4-r0","19.1.4-r1","19.1.4-r2","19.1.6-r0","19.1.6-r1","19.1.7-r0","19.1.7-r1","19.1.7-r2","19.1.7-r3","19.1.8-r0","19.1.8-r1","19.1.8-r2","19.1.8-r3","19.1.9-r0","19.1.9-r1","19.1.9-r2","19.5.3-r0","19.5.3-r1","19.5.3-r2","19.5.4-r0","19.5.4-r1","19.5.5-r0","19.5.5-r1","19.5.6-r0"],"provider":"osv","source":"DHI-h7sd-czag-mlsp-li3n","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"gitlab-rails-18","purl":"pkg:apk/dhi/gitlab-rails-18","versions":["18.11.11-r0","18.11.11-r1","18.11.11-r2","18.11.12-r0","18.11.12-r1","18.11.12-r2","18.11.12-r3","18.11.12-r4","18.11.14-r0","18.11.14-r1","18.11.14-r10","18.11.14-r11","18.11.14-r12","18.11.14-r2","18.11.14-r3","18.11.14-r4","18.11.14-r5","18.11.14-r6","18.11.14-r7","18.11.14-r8","18.11.14-r9"],"provider":"osv","source":"DHI-h7sd-czag-mlsp-li3n","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"gitlab-rails-19","purl":"pkg:apk/dhi/gitlab-rails-19","versions":["19.1.8-r0","19.1.8-r1","19.4.1-r0","19.4.1-r1","19.4.1-r2","19.4.1-r3","19.4.2-r0","19.5.3-r0","19.5.3-r1","19.5.3-r2","19.5.3-r3","19.5.3-r4","19.5.3-r5","19.5.3-r6","19.5.3-r7","19.5.3-r8","19.5.4-r0","19.5.4-r1","19.5.5-r0","19.5.5-r1","19.5.5-r2","19.5.6-r0","19.5.6-r1","19.6.0-r0"],"provider":"osv","source":"DHI-h7sd-czag-mlsp-li3n","relation":"self"},{"ecosystem":"Docker Hardened Images:Debian:13","package":"gitlab-rails-18","purl":"pkg:deb/dhi/gitlab-rails-18","versions":["18.11.11-0","18.11.11-1","18.11.11-2","18.11.12-0","18.11.12-1","18.11.12-2","18.11.14-0","18.11.14-1","18.11.14-10","18.11.14-11","18.11.14-12","18.11.14-13","18.11.14-14","18.11.14-15","18.11.14-16","18.11.14-17","18.11.14-18","18.11.14-19","18.11.14-2","18.11.14-20","18.11.14-21","18.11.14-22","18.11.14-23","18.11.14-24","18.11.14-25","18.11.14-26","18.11.14-27","18.11.14-28","18.11.14-29","18.11.14-3","18.11.14-4","18.11.14-5","18.11.14-6","18.11.14-7","18.11.14-8","18.11.14-9"],"provider":"osv","source":"DHI-h7sd-czag-mlsp-li3n","relation":"self"},{"ecosystem":"Docker Hardened Images:Debian:13","package":"gitlab-rails-19","purl":"pkg:deb/dhi/gitlab-rails-19","versions":["19.1.8-0","19.1.8-1","19.4.1-0","19.4.1-1","19.4.1-2","19.4.2-0","19.5.3-0","19.5.3-1","19.5.3-2","19.5.3-3","19.5.3-4","19.5.3-5","19.5.3-6","19.5.3-7","19.5.3-8","19.5.3-9","19.5.4-0","19.5.4-1","19.5.5-0","19.5.5-1","19.5.5-10","19.5.5-11","19.5.5-2","19.5.5-3","19.5.5-4","19.5.5-5","19.5.5-6","19.5.5-7","19.5.5-8","19.5.5-9","19.5.6-0","19.5.6-1","19.5.6-2","19.5.6-3","19.5.6-4","19.5.6-5","19.6.0-0","19.6.0-1"],"provider":"osv","source":"DHI-h7sd-czag-mlsp-li3n","relation":"self"}],"product_status":[],"references":[{"type":"ADVISORY","url":"https://scout.docker.com/v/DHI-h7sd-czag-mlsp-li3n"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21353"},{"type":"ADVISORY","url":"https://www.npmjs.com/package/pug-code-gen"},{"type":"ADVISORY","url":"https://www.npmjs.com/package/pug"},{"type":"ADVISORY","url":"https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr"},{"type":"ADVISORY","url":"https://github.com/pugjs/pug/releases/tag/pug%403.0.1"},{"type":"ADVISORY","url":"https://github.com/pugjs/pug/pull/3314"},{"type":"ADVISORY","url":"https://github.com/pugjs/pug/issues/3312"},{"type":"ADVISORY","url":"https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-p493-635q-r6gr"},{"type":"ADVISORY","url":"https://inthewild.io/vuln/CVE-2021-21353"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2021-21353"},{"type":"FIX","url":"https://www.cve.org/CVERecord?id=CVE-2021-21353"}]},{"provider":"osv","source_id":"GHSA-p493-635q-r6gr","relation":"self","url":"https://osv.dev/vulnerability/GHSA-p493-635q-r6gr","license":"CC-BY-4.0","published_at":"2021-03-03T02:03:52Z","modified_at":"2026-09-10T03:49:14.371503Z","summary":"Remote code execution via the `pretty` option.","details":"### 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)","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","source":"GHSA-p493-635q-r6gr"}],"affected":[{"ecosystem":"npm","package":"pug","purl":"pkg:npm/pug","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.0.1"}]}],"fixed":["3.0.1"],"provider":"osv","source":"GHSA-p493-635q-r6gr","relation":"self"},{"ecosystem":"npm","package":"pug-code-gen","purl":"pkg:npm/pug-code-gen","ranges":[{"type":"SEMVER","events":[{"introduced":"3.0.0"},{"fixed":"3.0.2"}]}],"fixed":["3.0.2"],"provider":"osv","source":"GHSA-p493-635q-r6gr","relation":"self"},{"ecosystem":"npm","package":"pug-code-gen","purl":"pkg:npm/pug-code-gen","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.3"}]}],"fixed":["2.0.3"],"provider":"osv","source":"GHSA-p493-635q-r6gr","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21353"},{"type":"WEB","url":"https://github.com/pugjs/pug/issues/3312"},{"type":"WEB","url":"https://github.com/pugjs/pug/pull/3314"},{"type":"WEB","url":"https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0"},{"type":"WEB","url":"https://github.com/pugjs/pug/releases/tag/pug%403.0.1"},{"type":"WEB","url":"https://www.npmjs.com/package/pug"},{"type":"WEB","url":"https://www.npmjs.com/package/pug-code-gen"}]},{"provider":"redhat-vex","source_id":"CVE-2021-21353","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2021-21353","license":"CC-BY-4.0","published_at":"2021-02-28T00:00:00Z","modified_at":"2025-04-16T23:20:08Z","summary":"pug: user provided objects as input to pug templates can achieve remote code execution","details":"A vulnerability was found in pug where a malicious user with access to the `pretty` option of the pug template compiler could achieve remote code execution on the backend through a user provided object.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","source":"CVE-2021-21353"},{"type":"Red Hat","score":"Moderate","source":"CVE-2021-21353"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","cpe":"cpe:/a:redhat:logging:5","status":"affected","packages":["openshift-logging/kibana6-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"Affected","provider":"redhat-vex","source":"CVE-2021-21353"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-21353.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-21353"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2150086"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-21353"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21353"},{"type":"WEB","url":"https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0"},{"type":"WEB","url":"https://github.com/pugjs/pug/issues/3312"},{"type":"WEB","url":"https://github.com/pugjs/pug/pull/3314"},{"type":"WEB","url":"https://github.com/pugjs/pug/releases/tag/pug%403.0.1"},{"type":"WEB","url":"https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr"}]}],"references":[{"type":"WEB","url":"https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr"},{"type":"WEB","url":"https://github.com/pugjs/pug/issues/3312"},{"type":"WEB","url":"https://github.com/pugjs/pug/pull/3314"},{"type":"WEB","url":"https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0"},{"type":"WEB","url":"https://github.com/pugjs/pug/releases/tag/pug%403.0.1"},{"type":"WEB","url":"https://www.npmjs.com/package/pug"},{"type":"WEB","url":"https://www.npmjs.com/package/pug-code-gen"},{"type":"ADVISORY","url":"https://scout.docker.com/v/DHI-h7sd-czag-mlsp-li3n"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21353"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-p493-635q-r6gr"},{"type":"ADVISORY","url":"https://inthewild.io/vuln/CVE-2021-21353"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2021-21353"},{"type":"FIX","url":"https://www.cve.org/CVERecord?id=CVE-2021-21353"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-21353.json"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2150086"}],"sources":[{"provider":"osv","source_id":"CLSA-2026-1777250300","url":"https://osv.dev/vulnerability/CLSA-2026-1777250300","modified_at":"2026-10-30T19:45:54.349637Z","relation":"upstream"},{"provider":"cvelistv5","source_id":"CVE-2021-21353","url":"https://www.cve.org/CVERecord?id=CVE-2021-21353","license":"CC-BY-4.0","modified_at":"2026-11-02T17:59:55.421Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2021-21353","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21353","relation":"self"},{"provider":"osv","source_id":"DHI-h7sd-czag-mlsp-li3n","url":"https://osv.dev/vulnerability/DHI-h7sd-czag-mlsp-li3n","license":"Apache-2.0","modified_at":"2026-11-19T19:00:22.964888Z","relation":"self"},{"provider":"osv","source_id":"GHSA-p493-635q-r6gr","url":"https://osv.dev/vulnerability/GHSA-p493-635q-r6gr","license":"CC-BY-4.0","modified_at":"2026-09-10T03:49:14.371503Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2021-21353","url":"https://access.redhat.com/security/cve/CVE-2021-21353","license":"CC-BY-4.0","modified_at":"2025-04-16T23:20:08Z","relation":"self"}]}
