9.8

CVE-2023-38704: datadog import-in-the-middle Improper Input Validation

CVSS: 9.8v3.1CriticalModified
AliasesGHSA-5r27-rw8r-7967
Published 07-08-2023Last modified 03-10-2024

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.

Overall risk
70/100
0100
High · default modelHow is this calculated?
CVSS score
9.8/10
010
Critical · v3.1 (NVD)
EPSS score
1.00%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits0No public exploits recorded

Timeline

  1. 07-08-2023
    PublishedVulnerability first disclosed.
  2. 03-10-2024
    Last 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

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

19-09-202619-10-2026
EPSS score
1.00%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Datadog1 product
Datadoghq1 product
Npm1 product
  • import-in-the-middle< 1.4.2

3 vendors · 3 products

References

4 links