{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-36361","id":"CVE-2024-36361","title":"Pug allows JavaScript code execution if an application accepts untrusted input","description":"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.","descriptionLong":"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","updated":"2026-10-28T02:30:51.451581819Z","reserved":"2024-05-24T00:00:00.000Z","status":"Deferred","rejected":false,"assigner":"mitre","metric":{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","rating":"medium","source":"CISA-ADP"},"metrics":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","rating":"medium","source":"CISA-ADP"},{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"version":"n/a","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"pug-code-gen","purl":"pkg:npm/pug-code-gen","ranges":["<3.0.3"],"fixed":["3.0.3"],"advisory":"GHSA-3965-hpx2-q597"},{"ecosystem":"npm","name":"pug","purl":"pkg:npm/pug","ranges":["<3.0.3"],"fixed":["3.0.3"],"advisory":"GHSA-3965-hpx2-q597"}],"cwes":["CWE-94"],"aliases":["GHSA-3965-hpx2-q597"],"references":[{"url":"https://github.com/pugjs/pug/pull/3428","tags":["x_transferred","fix","web"]},{"url":"https://pugjs.org/api/reference.html","tags":["x_transferred","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/36xxx/CVE-2024-36361.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-36361","tags":["advisory"]},{"url":"https://github.com/pugjs/pug/pull/3438","tags":["web"]},{"url":"https://github.com/pugjs/pug/commit/32acfe8f197dc44c54e8af32c7d7b19aa9d350fb","tags":["web"]},{"url":"https://github.com/Coding-Competition-Team/hackac-2024/tree/main/web/pug","tags":["web"]},{"url":"https://github.com/pugjs/pug","tags":["package"]},{"url":"https://github.com/pugjs/pug/blob/4767cafea0af3d3f935553df0f9a8a6e76d470c2/packages/pug/lib/index.js#L328","tags":["web"]},{"url":"https://github.com/pugjs/pug/releases/tag/pug%403.0.3","tags":["web"]},{"url":"https://www.npmjs.com/package/pug-code-gen","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total"},"epss":0.00491,"epssPercentile":0.42953,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-36361","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-36361","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-36361","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-3965-hpx2-q597","ok":true,"note":"GHSA-3965-hpx2-q597"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-36361","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}