Every CVE Search/ Get API key

CVE-2024-36361

Pug allows JavaScript code execution if an application accepts untrusted input

6.8 MediumFix availableDisputed

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
None

Exploit likelihood

0.49%Up 0.4 points since Feb 14, 2025
90%50%10%1%

What each source reports

CVE List Score used 6.8

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.

Record
CVE-2024-36361
CVSS 3.1
6.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-94
Updated
2026-11-02
EUVDEUVD-2024-1383 6.8

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.

Record
EUVD-2024-1383
CVSS 3.1
6.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-3965-hpx2-q597 6.8

Pug 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.

Record
GHSA-3965-hpx2-q597
CVSS 3.1
6.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-94
Updated
2026-11-02
NVD 6.8

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.

Record
CVE-2024-36361
CVSS 3.1
6.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-94
Updated
2026-11-02
OSV 6.8

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.

Record
CVE-2024-36361
CVSS 3.1
6.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Updated
2026-11-02
OSVGHSA-3965-hpx2-q597 6.8

Pug 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.

Record
GHSA-3965-hpx2-q597
CVSS 3.1
6.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-94
Updated
2026-11-02
Show 4 moreShow less
OSVCLSA-2026-1777250300 No score

TuxCare security update for pug (2 CVEs)

TuxCare rebuilt pug to address 2 CVEs. Fixed in 2.0.4-tuxcare.4.

Record
CLSA-2026-1777250300
Updated
2026-11-02
OSVCLSA-2026-1786620685 No score

TuxCare security update for pug-code-gen (2 CVEs)

TuxCare rebuilt pug-code-gen to address 2 CVEs. Fixed in 2.0.2-tuxcare.5.

Record
CLSA-2026-1786620685
Updated
2026-11-02
OSVROOT-APP-NPM-AIKIDO-2024-10105 No score

AIKIDO-2024-10105 in @rootio/pug - Patched by Root

Root has patched AIKIDO-2024-10105 in the @rootio/pug package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-AIKIDO-2024-10105
Updated
2026-11-02
OSVROOT-APP-NPM-CVE-2024-36361 No score

CVE-2024-36361 in @rootio/pug - Patched by Root

Root has patched CVE-2024-36361 in the @rootio/pug package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-CVE-2024-36361
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
pug
npm
through 3.0.2
3.0.3
pug-code-gen
npm
through 3.0.2
3.0.3
pug
TuxCare:npm
From an advisory covering 2 CVEs
2.0.4-tuxcare.0 up to 2.0.4-tuxcare.4, plus listed versions
2.0.42.0.4-tuxcare.12.0.4-tuxcare.22.0.4-tuxcare.3
2.0.4-tuxcare.4
pug-code-gen
TuxCare:npm
2.0.2-tuxcare.0 up to 2.0.2-tuxcare.5, plus listed versions
2.0.22.0.2-tuxcare.12.0.2-tuxcare.22.0.2-tuxcare.32.0.2-tuxcare.4
2.0.2-tuxcare.5
pug-code-gen
npm
before 3.0.3
3.0.3
pug
npm
before 3.0.3
3.0.3
@rootio/pug
Root:npm
before 2.0.4-root.io.1
2.0.4-root.io.12.0.4-root.io.2
pug
Root:npm
before 2.0.4-aikido.1
2.0.4-aikido.12.0.4-aikido.2
@rootio/pug
Root:npm
before 2.0.4-root.io.2
2.0.4-root.io.2
pug
Root:npm
before 2.0.4-aikido.2
2.0.4-aikido.2

History

History
RecordedChangedSources
affected, facts
aliases, publishedEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-36361 is a medium vulnerability (CVSS 6.8) in Pugjs Pug, published May 24, 2024. Its validity is disputed. EPSS puts the chance of exploitation in the next 30 days at 0.49%, the 42nd percentile. Fixed in pug 3.0.3.

References

Show 6 moreShow less
MoveEnter Open