CVE-2023-38704
import-in-the-middle es un interceptor de carga de módulos específicamente para módulos ESM. El cargador de import-in-the-middle funciona generando un módulo envoltorio sobre la marcha. El envoltorio utiliza el especificador del módulo para cargar el módulo original y añadir algo de código de envoltura. Antes de la versión 1.4.2, permite la ejecución remota de código en los casos en que una aplicación pasa directamente a la función `import()` una entrada proporcionada por el usuario. Esta vulnerabilidad se ha corregido en la versión 1.4.2 de import-in-the-middle.
Están disponibles algunas medidas de mitigación. No pase ninguna entrada proporcionada por el usuario a `import()`. En su lugar, verifíquela frente a un conjunto de valores permitidos.
Leer descripción completaMostrar menos
Si utiliza import-in-the-middle, directa o indirectamente, y no necesita soporte para módulos de EcmaScript, asegúrese de que no se establezca ninguna opción, ya sea mediante la línea de comandos o la variable de entorno `NODE_OPTIONS`, que habilite los hooks de carga.
Traducción automática del texto original de NVD (en inglés).
Cronología
Elaborada con nuestros propios datos: NVD, CISA KEV y otros catálogos de explotación, FIRST EPSS, exploits públicos, prensa especializada y la cobertura de Orbitaley.
- Registro CVE publicado en NVD
- Última modificación del registro en NVD
Tecnologías afectadas (1)
Registro NVD
- Estado en NVD
- Modificada
- Publicada
- 7 ago 2023
- Última modificación
- 17 jun 2026
- Vector CVSS
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Debilidad (CWE)
- CWE-20
Referencias
JSON original (NVD)
Mostrar
{
"id": "CVE-2023-38704",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2023-38704",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2024-10-03T18:05:42.675284Z"
}
}
],
"cvssMetricV31": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"cvssData": {
"scope": "CHANGED",
"version": "3.1",
"baseScore": 8.1,
"attackVector": "NETWORK",
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:L",
"integrityImpact": "LOW",
"userInteraction": "NONE",
"attackComplexity": "HIGH",
"availabilityImpact": "LOW",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.3,
"exploitabilityScore": 2.2
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 9.8,
"attackVector": "NETWORK",
"baseSeverity": "CRITICAL",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "HIGH",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.9,
"exploitabilityScore": 3.9
}
]
},
"affected": [
{
"source": "security-advisories@github.com",
"affectedData": [
{
"vendor": "DataDog",
"product": "import-in-the-middle",
"versions": [
{
"status": "affected",
"version": "< 1.4.2"
}
]
}
]
}
],
"published": "2023-08-07T20:15:09.693",
"references": [
{
"url": "https://github.com/DataDog/import-in-the-middle/commit/2531cdd9d1d73f9eaa87c16967f60cb276c1971b",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/DataDog/import-in-the-middle/security/advisories/GHSA-5r27-rw8r-7967",
"tags": [
"Mitigation",
"Third Party Advisory"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/DataDog/import-in-the-middle/commit/2531cdd9d1d73f9eaa87c16967f60cb276c1971b",
"tags": [
"Patch"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/DataDog/import-in-the-middle/security/advisories/GHSA-5r27-rw8r-7967",
"tags": [
"Mitigation",
"Third Party Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"description": [
{
"lang": "en",
"value": "CWE-20"
}
]
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "NVD-CWE-noinfo"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "import-in-the-middle is a module loading interceptor specifically for ESM modules. The import-in-the-middle loader works by generating a wrapper module on the fly. The wrapper uses the module specifier to load the original module and add some wrapping code. Prior to version 1.4.2, it allows for remote code execution in cases where an application passes user-supplied input directly to the `import()` function. This vulnerability has been patched in import-in-the-middle version 1.4.2.\n\nSome workarounds are available. Do not pass any user-supplied input to `import()`. Instead, verify it against a set of allowed values. If using import-in-the-middle, directly or indirectly, and support for EcmaScript Modules is not needed, ensure that no options are set, either via command-line or the `NODE_OPTIONS` environment variable, that would enable loader hooks."
}
],
"lastModified": "2026-06-17T06:10:59.403",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:datadoghq:import-in-the-middle:*:*:*:*:*:node.js:*:*",
"vulnerable": true,
"matchCriteriaId": "9D7D6D78-56DF-47BF-8D7D-09DE9E6B667C",
"versionEndExcluding": "1.4.2"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "security-advisories@github.com"
}