Summary
Unsanitized user controlled input in module generation
Workarounds
- Do not pass any user-supplied input to
import(). Instead, verify it against a set of allowed values. - If using
@opentelemetry/instrumentationwith support for EcmaScript Modules is not needed, ensure that none of the following options are set (either via command-line or theNODE_OPTIONSenvironment variable):
--experimental-loader=@opentelemetry/instrumentation/hook.mjs
--experimental-loader @opentelemetry/instrumentation/hook.mjs
--loader=import-in-the-middle/hook.mjs
--loader import-in-the-middle/hook.mjs
References
Impact
The import-in-the-middle loader used by @opentelemetry/instrumentation 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. It allows for remote code execution in cases where an application passes user-supplied input directly to an import() function.
GHSA-F8PQ-3926-8GX5 has a CVSS score of 8.1 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.41.2); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
This vulnerability has been patched in @opentelemetry/instrumentation version 0.41.2
Frequently Asked Questions
- What is GHSA-F8PQ-3926-8GX5? GHSA-F8PQ-3926-8GX5 is a high-severity security vulnerability in @opentelemetry/instrumentation (npm), affecting versions >= 0.40.0, < 0.41.2. It is fixed in 0.41.2.
- How severe is GHSA-F8PQ-3926-8GX5? GHSA-F8PQ-3926-8GX5 has a CVSS score of 8.1 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of @opentelemetry/instrumentation are affected by GHSA-F8PQ-3926-8GX5? @opentelemetry/instrumentation (npm) versions >= 0.40.0, < 0.41.2 is affected.
- Is there a fix for GHSA-F8PQ-3926-8GX5? Yes. GHSA-F8PQ-3926-8GX5 is fixed in 0.41.2. Upgrade to this version or later.
- Is GHSA-F8PQ-3926-8GX5 exploitable, and should I be worried? Whether GHSA-F8PQ-3926-8GX5 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-F8PQ-3926-8GX5 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-F8PQ-3926-8GX5? Upgrade
@opentelemetry/instrumentationto 0.41.2 or later.