Read the docs
TI-2023-20052 Aliases CVE-2023-38704GHSA-5r27-rw8r-7967

import-in-the-middle allows unsanitized user controlled input in module generation

Priority MEDIUM 44CWE-20Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub.

Summary

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. Some 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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01 63rd percentileScored 2026-11-07
Fix Fixed import-in-the-middle (DataDog): 1.4.2import-in-the-middle (npm): 1.4.2

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
DataDogimport-in-the-middlebefore 1.4.21.4.2Patch availableCNA
—import-in-the-middle (npm)before 1.4.21.4.2Patch availableGHSA-5r27-rw8r-7967
  • import-in-the-middle VendorDataDog Affected before 1.4.2 Fixed in 1.4.2 Patch available CNA
  • import-in-the-middle (npm) Vendor— Affected before 1.4.2 Fixed in 1.4.2 Patch available GHSA-5r27-rw8r-7967

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:datadoghq:import-in-the-middle:*:*:*:*:*:node.js:*:*before 1.4.2VulnerableDatadoghq
  • cpe:2.3:a:datadoghq:import-in-the-middle:*:*:*:*:*:node.js:*:* Versions before 1.4.2 Vulnerable ·Datadoghq

Remediation

  • Fix · CNA import-in-the-middle (DataDog) Fixed in 1.4.2
  • Fix · GHSA-5r27-rw8r-7967 import-in-the-middle (npm) Fixed in 1.4.2 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-38704
  2. 2026-10-03 Alias added: GHSA-5r27-rw8r-7967

References

  • TI-2026-32833 GuardDog: Blind GitHub URL rewrite in remote project scanning causes SSRF and `GH_TOKEN` exfiltration CVSS 3.1HIGH 8.2
  • TI-2022-07587 GuardDog vulnerable to arbitrary file write when scanning a specially-crafted remote PyPI package CVSS 3.1MEDIUM 6.5
  • TI-2026-26107 dd-trace-java: Unsafe deserialization in RMI instrumentation may lead to remote code execution CVSS 4.0CRITICAL 9.3
  • TI-2026-81528 ReDoS in dd-trace URL query string obfuscation CVSS 4.0HIGH 8.7
  • TI-2026-80927 ReDoS in Datadog dd-trace-py URL query string obfuscation CVSS 4.0HIGH 8.7
  • TI-2026-80928 Datadog dd-trace-py IAST flaw lets attackers crash Python processes CVSS 4.0HIGH 8.2
See all 28 →

Sources