CVE-2023-38704: datadog import-in-the-middle Improper Input Validation
Vulnerability summary
CVE-2023-38704 is a critical (CVSS 9.8) Improper Input Validation vulnerability in datadog import-in-the-middle. EPSS estimates a 1.00% chance of exploitation in the next 30 days, higher than 62.2% of scored vulnerabilities.
Timeline
- 07-08-2023PublishedVulnerability first disclosed.
- 03-10-2024Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
3 scores · 3 sources · 1 version- CVE.orgCNA8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:LDiffers
- OSV · NpmEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:LDiffers
EPSS trend
Probability
1.00%
Chance of exploitation in the next 30 days
Percentile
62%
Versus all other CVEs
30-day change
0.00 pp
From 1.00% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Datadog1 product
- import-in-the-middle< 1.4.2
Datadoghq1 product
- import-in-the-middle< 1.4.2
Npm1 product
- import-in-the-middle< 1.4.2
3 vendors · 3 products
References
4 links- github.com/DataDog/import-in-the-middle/security/advisories/GHSA-5r27-rw8r-7967X Refsource CONFIRMWEBMitigationThird Party Advisory
- github.com/DataDog/import-in-the-middle/commit/2531cdd9d1d73f9eaa87c16967f60cb276c1971bX Refsource MISCWEBPatch