CVE-2026-49982
Full vulnerability record from the local CVENow database.
Description
tmp is a temporary file and directory creator for node.js. In version 0.2.6, the _assertPath guard added to tmp rejects only string values that contain the substring ... It is bypassed when prefix, postfix, or template is supplied as a non-string value (Array, Buffer, or any object) whose includes('..') returns falsy but whose stringification still contains ../. The value flows through Array.prototype.join/String coercion inside _generateTmpName and path.join(tmpDir, opts.dir, name), producing a final path that escapes tmpdir and creates a file or directory at an attacker-controlled location with the host process's privileges. This affects any application that forwards untrusted request data (a common pattern is JSON body fields or qs-parsed bracket-array query strings such as ?prefix[]=...) into tmp.file, tmp.fileSync, tmp.dir, tmp.dirSync, tmp.tmpName, or tmp.tmpNameSync without explicit type coercion. This vulnerability is fixed in 0.2.7.
View original CVE JSON
{
"id": "CVE-2026-49982",
"sourceIdentifier": "[email protected]",
"published": "2026-06-11T17:16:35.227",
"lastModified": "2026-10-26T11:10:00.157",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "tmp is a temporary file and directory creator for node.js. In version 0.2.6, the _assertPath guard added to tmp rejects only string values that contain the substring ... It is bypassed when prefix, postfix, or template is supplied as a non-string value (Array, Buffer, or any object) whose includes('..') returns falsy but whose stringification still contains ../. The value flows through Array.prototype.join/String coercion inside _generateTmpName and path.join(tmpDir, opts.dir, name), producing a final path that escapes tmpdir and creates a file or directory at an attacker-controlled location with the host process's privileges. This affects any application that forwards untrusted request data (a common pattern is JSON body fields or qs-parsed bracket-array query strings such as ?prefix[]=...) into tmp.file, tmp.fileSync, tmp.dir, tmp.dirSync, tmp.tmpName, or tmp.tmpNameSync without explicit type coercion. This vulnerability is fixed in 0.2.7."
},
{
"lang": "es",
"value": "tmp es un creador de archivos y directorios temporales para node.js. En la versión 0.2.6, la protección _assertPath añadida a tmp rechaza solo valores de cadena que contienen la subcadena ... Se omite cuando prefix, postfix o template se suministra como un valor no-cadena (Array, Buffer o cualquier objeto) cuyo includes(’..’) devuelve falso pero cuya conversión a cadena aún contiene .. / . El valor fluye a través de la coerción Array.prototype.join/String dentro de _generateTmpName y path.join(tmpDir, opts.dir, name), produciendo una ruta final que escapa de tmpdir y crea un archivo o directorio en una ubicación controlada por el atacante con los privilegios del proceso anfitrión. Esto afecta a cualquier aplicación que reenvía datos de solicitud no confiables (un patrón común son los campos de cuerpo JSON o las cadenas de consulta de array entre corchetes analizadas por qs como ?prefix[]=...) a tmp.file, tmp.fileSync, tmp.dir, tmp.dirSync, tmp.tmpName o tmp.tmpNameSync sin coerción de tipo explícita. Esta vulnerabilidad se corrige en 0.2.7."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "raszi",
"product": "node-tmp",
"versions": [
{
"version": "0.2.6",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L",
"baseScore": 8.2,
"baseSeverity": "HIGH",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "NONE",
"integrityImpact": "HIGH",
"availabilityImpact": "LOW"
},
"exploitabilityScore": 3.9,
"impactScore": 4.2
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-06-11T18:24:14.195781Z",
"id": "CVE-2026-49982",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "yes"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-20"
},
{
"lang": "en",
"value": "CWE-22"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:raszi:tmp:0.2.6:*:*:*:*:node.js:*:*",
"matchCriteriaId": "00D80707-0616-4761-A117-722DB74FA490"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/raszi/node-tmp/security/advisories/GHSA-7c78-jf6q-g5cm",
"source": "[email protected]",
"tags": [
"Exploit",
"Mitigation",
"Vendor Advisory"
]
},
{
"url": "https://github.com/raszi/node-tmp/security/advisories/GHSA-7c78-jf6q-g5cm",
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"tags": [
"Exploit",
"Mitigation",
"Vendor Advisory"
]
}
]
}