CVE-2024-36361
JSON

6.8medium

Pug allows JavaScript code execution if an application accepts untrusted input

Severity
6.8medium CVSS:3.1 by CISA-ADP
Exploit likelihood
0.49% (higher than 43% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-3965-hpx2-q597

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
pugjs pugfrom 0.0.2 up to 3.0.2CVE List
pug-code-gen (npm)before 3.0.3GitHub Advisory Database
pug (npm)before 3.0.3GitHub Advisory Database

All scores

CISA-ADP6.8medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
GitHub6.8medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N

Classification

CWE-94

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

Pug hasta 3.0.2 permite la ejecución de código JavaScript si una aplicación acepta entradas que no son de confianza para la opción de nombre de la función compileClient, compileFileClient o compileClientWithDependenciesTracked. NOTA: estas funciones son para compilar plantillas de Pug en JavaScript y normalmente no habría motivo para permitir llamadas que no sean de confianza.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-36361 changed 2025-02-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-3965-hpx2-q597 changed 2026-09-10CC-BY-4.0
NVDCVE-2024-36361 changed 2026-06-17Public domain