{"id":"CVE-2024-36361","aliases":["GHSA-3965-hpx2-q597"],"url":"https://o3.security/vulnerability/CVE-2024-36361","summary":"Pug allows JavaScript code execution if an application accepts untrusted input","details":"Pug through 3.0.2 allows JavaScript code execution if an application accepts untrusted input for the name option of the compileClient, compileFileClient, or compileClientWithDependenciesTracked function. NOTE: these functions are for compiling Pug templates into JavaScript, and there would typically be no reason to allow untrusted callers.","published":"2024-05-24T06:04:19.211Z","modified":"2026-07-15T01:49:02.565789277Z","cvss":{"score":6.8,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"pug-code-gen","fixedVersion":"3.0.3"},{"ecosystem":"npm","name":"pug","fixedVersion":"3.0.3"}],"fix":{"url":"https://github.com/pugjs/pug/pull/3428","label":"pugjs/pug#3428"},"references":[{"type":"WEB","url":"https://pugjs.org/api/reference.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/36xxx/CVE-2024-36361.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-36361"},{"type":"FIX","url":"https://github.com/pugjs/pug/pull/3428"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-15T01:49:02.565789277Z"}}