Medium
Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-36361
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 19:38 UTC · Revision 1
Source evidence
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.
osv:CVE-2024-36361
Complete source record
{
"id": "7a234f46eb7243e25f0ec7c6fd8f37533b87d94597563daae01dfac064788c90",
"url": "https://osv.dev/vulnerability/CVE-2024-36361",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2024-36361",
"summary": "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.",
"evidence": "osv:CVE-2024-36361",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2024-36361",
"aliases": [
"CVE-2024-36361",
"GHSA-3965-hpx2-q597"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/pugjs/pug",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"last_affected": "d4b7f602ba38212c2a5ad9431479ce959c466c4b"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"last_affected": "3.0.2"
}
],
"source": "DESCRIPTION"
}
]
}
}
],
"versions": [
"pug@3.0.2",
"pug-runtime@3.0.1",
"pug-lexer@5.0.1",
"pug@3.0.1",
"pug-code-gen@3.0.2",
"pug@2.0.4",
"pug-walk@1.1.8",
"pug-strip-comments@1.0.4",
"pug-runtime@2.0.5",
"pug-parser@5.0.1",
"pug-load@2.0.12",
"pug-linker@3.0.6",
"pug-lexer@4.1.0",
"pug-filters@3.1.1",
"pug-error@1.3.3",
"pug-code-gen@2.0.2",
"pug-attrs@2.0.4",
"pug-code-gen@3.0.1",
"pug@3.0.0",
"pug-walk@2.0.0",
"pug-strip-comments@2.0.0",
"pug-runtime@3.0.0",
"pug-parser@6.0.0",
"pug-load@3.0.0",
"pug-linker@4.0.0",
"pug-lexer@5.0.0",
"pug-filters@4.0.0",
"pug-error@2.0.0",
"pug-code-gen@3.0.0",
"pug-attrs@3.0.0",
"pug@2.0.3",
"pug-filters@3.1.0",
"pug@2.0.2",
"pug-filters@3.0.2",
"pug@2.0.1",
"pug-walk@1.1.7",
"pug-parser@5.0.0",
"pug-load@2.0.11",
"pug-linker@3.0.5",
"pug-filters@3.0.1",
"pug@2.0.0",
"pug-walk@1.1.6",
"pug-strip-comments@1.0.3",
"pug-runtime@2.0.4",
"pug-parser@4.0.1",
"pug-load@2.0.10",
"pug-linker@3.0.4",
"pug-lexer@4.0.0",
"pug-filters@3.0.0",
"pug-code-gen@2.0.1",
"pug-attrs@2.0.3",
"pug@2.0.0-rc.4",
"pug-walk@1.1.5",
"pug-parser@4.0.0",
"pug-load@2.0.9",
"pug-linker@3.0.3",
"pug-filters@2.1.5",
"pug-code-gen@2.0.0",
"1.11.0",
"pug@2.0.0-rc.3",
"pug-walk@1.1.4",
"pug-parser@3.0.1",
"pug-load@2.0.8",
"pug-linker@3.0.2",
"pug-filters@2.1.4",
"pug@2.0.0-rc.2",
"pug-walk@1.1.3",
"pug-parser@3.0.0",
"pug-load@2.0.7",
"pug-linker@3.0.1",
"pug-filters@2.1.3",
"pug@2.0.0-rc.1",
"pug-linker@3.0.0",
"pug@2.0.0-beta.12",
"pug-walk@1.1.2",
"pug-load@2.0.6",
"pug-linker@2.0.3",
"pug-lexer@3.1.0",
"pug-filters@2.1.2",
"pug@2.0.0-beta11",
"pug-walk@1.1.1",
"pug-load@2.0.5",
"pug-linker@2.0.2",
"pug-lexer@3.0.0",
"pug-filters@2.1.1",
"pug@2.0.0-beta10",
"pug-lexer@2.3.2",
"pug@2.0.0-beta9",
"pug-linker@2.0.1",
"pug@2.0.0-beta8",
"pug-linker@2.0.0",
"pug-filters@2.1.0",
"pug@2.0.0-beta7",
"pug-walk@1.1.0",
"pug-strip-comments@1.0.2",
"pug-runtime@2.0.3",
"pug-parser@2.0.2",
"pug-load@2.0.4",
"pug-linker@1.0.2",
"pug-lexer@2.3.1",
"pug-filters@2.0.0",
"pug-error@1.3.2",
"pug-code-gen@1.1.1",
"pug-attrs@2.0.2",
"2.0.0-beta6",
"2.0.0-beta5",
"2.0.0-beta4",
"2.0.0-beta3",
"2.0.0-beta2",
"2.0.0-beta1",
"2.0.0-alpha8",
"2.0.0-alpha7",
"2.0.0-alpha6",
"1.10.0",
"1.9.2",
"1.9.1",
"1.9.0",
"1.8.2",
"1.8.1",
"1.8.0",
"1.7.0",
"1.6.0",
"1.5.0",
"1.4.2",
"1.4.1",
"1.4.0",
"1.3.1",
"1.3.0",
"1.2.0",
"1.1.5",
"1.1.4",
"1.1.3",
"1.1.2",
"1.1.1",
"1.1.0",
"1.0.2",
"1.0.1",
"1.0.0",
"0.35.0",
"0.34.1",
"0.34.0",
"0.33.0",
"0.32.0",
"0.31.2",
"0.31.1",
"0.31.0",
"0.30.0",
"0.29.0",
"0.28.2",
"0.28.1",
"0.28.0",
"0.16.2",
"0.27.7",
"0.27.6",
"0.27.5",
"0.27.4",
"0.27.3",
"0.27.2",
"0.27.1",
"0.27.0",
"0.26.3",
"0.26.2",
"0.26.1",
"0.26.0",
"0.25.0",
"0.24.0",
"0.23.0",
"0.22.1",
"0.22.0",
"0.21.0",
"0.20.0",
"0.19.0",
"0.18.0",
"0.17.0",
"0.16.4",
"0.16.3",
"0.16.1",
"0.16.0",
"0.15.4",
"0.15.3",
"0.15.2",
"0.15.1",
"0.15.0",
"0.14.2",
"0.14.1",
"0.14.0",
"0.13.0",
"0.12.4",
"0.12.3",
"0.12.2",
"0.12.1",
"0.12.0",
"0.11.1",
"0.11.0",
"0.10.7",
"0.10.6",
"0.10.5",
"0.10.4",
"0.10.3",
"0.10.2",
"0.10.1",
"0.10.0",
"0.9.3",
"0.9.2",
"0.9.1",
"0.9.0",
"0.8.9",
"0.8.8",
"0.8.7",
"0.8.6",
"0.8.5",
"0.8.4",
"0.8.3",
"0.8.2",
"0.8.1",
"0.8.0",
"0.7.1",
"0.7.0",
"0.6.3",
"0.6.2",
"0.6.0",
"0.5.7",
"0.5.6",
"0.5.5",
"0.5.4",
"0.5.3",
"0.5.2",
"0.5.1",
"0.5.0",
"0.4.1",
"0.4.0",
"0.3.0",
"0.2.4",
"0.2.3",
"0.2.2",
"0.2.1",
"0.2.0",
"0.1.0",
"0.0.2"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-36361.json"
}
}
],
"modified": "2026-10-28T02:30:51.451581819Z",
"provider": "osv",
"references": [
"https://pugjs.org/api/reference.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/36xxx/CVE-2024-36361.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-36361",
"https://github.com/pugjs/pug/pull/3428"
],
"provider_metadata": {
"isDisputed": true,
"cna_assigner": "mitre",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/36xxx/CVE-2024-36361.json"
}
},
"related_cves": [
{
"value": "CVE-2024-36361",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 520239,
"published_at": "2024-05-24T06:04:19.211+00:00"
}