All reports
Medium

Pug allows JavaScript code execution if an application accepts untrusted input

Affected versions

Affected versions
<= 3.0.2
Fixed version
3.0.3
npmpug
Affected versions
<= 3.0.2
Fixed version
3.0.3

Exploitation

CVE-2024-36361

Probability of exploitation in the next 30 days: 0.49%

FIRST EPSS · 2026-11-19

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.

Links

Credits

  • davidrunger
  • filipeom