CVE-2024-36361
MEDIUM 6.8CVSS 3.1Pug allows JavaScript code execution if an application accepts untrusted input
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
- 24 May 2024
- Last modified
- 10 Sep 2026
- Assigned by
- cve@mitre.org
- NVD status
- Deferred
- Weakness
- CWE-94
- Also known as
- GHSA-3965-hpx2-q597
- Sources
- NVDJSONOSV GHSA-3965-hpx2-q597JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | MEDIUM 6.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | pug-code-gen | < 3.0.3 | 3.0.3 |
| OSV | npm | pug | < 3.0.3 | 3.0.3 |
References
- https://github.com/pugjs/pug/pull/3428 · WEB
- https://pugjs.org/api/reference.html · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-36361 · ADVISORY
- https://github.com/pugjs/pug/pull/3438 · WEB
- https://github.com/pugjs/pug/commit/32acfe8f197dc44c54e8af32c7d7b19aa9d350fb · WEB
- https://github.com/Coding-Competition-Team/hackac-2024/tree/main/web/pug · WEB
- https://github.com/pugjs/pug · PACKAGE
- https://github.com/pugjs/pug/blob/4767cafea0af3d3f935553df0f9a8a6e76d470c2/packages/pug/lib/index.js#L328 · WEB
- https://github.com/pugjs/pug/releases/tag/pug%403.0.3 · WEB
- https://www.npmjs.com/package/pug-code-gen · WEB
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 24 May 2024)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 24 May 2024)