Live threats

All CVEs / pugjs

CVE-2024-36361pugjs pug

Medium 6.8 No auth needed

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for pug.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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

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.