SCA: security update for import-in-the-middle (GHSA-5r27-rw8r-7967)

critical Tenable Cloud Security Plugin ID 410988

Description

There are packages installed that are affected by a vulnerability referenced in the following CVE:

- 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. (CVE-2023-38704)

See Also

https://github.com/advisories/GHSA-5r27-rw8r-7967

Plugin Details

Severity: Critical

ID: 410988

Version: Revision 1.7

Type: Local

Family: SCA Checks

Published: 1/23/2025

Updated: 6/1/2026

Risk Information

VPR

Risk Factor: Medium

Score: 5.9

Vendor

Vendor Severity: High

CVSS v2

Risk Factor: Critical

Base Score: 10

Temporal Score: 7.4

Vector: CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C

CVSS Score Source: CVE-2023-38704

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.5

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:U/RL:O/RC:C

Vulnerability Information

Exploit Ease: No known exploits are available

Patch Publication Date: 8/8/2023

Vulnerability Publication Date: 8/7/2023

Reference Information

CVE: CVE-2023-38704

cwe: CWE-20