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 package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| pugjs pug | from 0.0.2 up to 3.0.2 | CVE List |
| pug-code-gen (npm) | before 3.0.3 | GitHub Advisory Database |
| pug (npm) | before 3.0.3 | GitHub Advisory Database |
All scores
| CISA-ADP | 6.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N |
| GitHub | 6.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-36361 changed 2025-02-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-3965-hpx2-q597 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-36361 changed 2026-06-17 | Public domain |