CVE-2024-36361pugjs pug
Medium 6.8 No auth needed
Follow: this CVE · pugjs · pugjs pug We alert you by email or Slack (account required).
- Priority
- 56
- CVSS 3.1
- 6.8
- EPSS
- 0.8% probability of exploitation in 30 days · percentile 53
- Auth required
- No
- Published
- May 24, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-94
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
What happens
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.
What to do
- Apply the vendor's security update for pug.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | pug |
< 3.0.3 |
3.0.3 |
npm install pug@3.0.3 |
| npm | pug-code-gen |
< 3.0.3 |
3.0.3 |
npm install pug-code-gen@3.0.3 |
Per OSV / GitHub Advisories (GHSA-3965-hpx2-q597). Check the version in your lockfile before upgrading.
Affected products
- pugjs · pug
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.