Skip to content

Pug allows JavaScript code execution if an application accepts untrusted input

High severity GitHub Reviewed Published May 24, 2024 to the GitHub Advisory Database • Updated May 28, 2024

Package

npm pug (npm)

Affected versions

<= 3.0.2

Patched versions

3.0.3
npm pug-code-gen (npm)
<= 2.0.3
3.0.3

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.

References

Published by the National Vulnerability Database May 24, 2024
Published to the GitHub Advisory Database May 24, 2024
Reviewed May 24, 2024
Last updated May 28, 2024

Severity

High
8.1
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2024-36361

GHSA ID

GHSA-3965-hpx2-q597

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.