{"id":"GHSA-f8pq-3926-8gx5","aliases":[],"url":"https://o3.security/vulnerability/GHSA-f8pq-3926-8gx5","summary":"Unsanitized user controlled input in module generation","details":"## Impact\n\nThe `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.\n\n## Patches\n\nThis vulnerability has been patched in `@opentelemetry/instrumentation` version `0.41.2`\n\n## Workarounds\n\n- Do not pass any user-supplied input to `import()`. Instead, verify it against a set of allowed values.\n- If using `@opentelemetry/instrumentation` with support for EcmaScript Modules is not needed, ensure that none of the following options are set (either via command-line or the `NODE_OPTIONS` environment variable):\n```\n--experimental-loader=@opentelemetry/instrumentation/hook.mjs\n--experimental-loader @opentelemetry/instrumentation/hook.mjs\n--loader=import-in-the-middle/hook.mjs\n--loader import-in-the-middle/hook.mjs\n```\n\n## References\n\n- https://github.com/DataDog/import-in-the-middle/security/advisories/GHSA-5r27-rw8r-7967","published":"2023-08-09T20:59:14Z","modified":"2023-08-09T20:59:14Z","cvss":{"score":8.1,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:L"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@opentelemetry/instrumentation","fixedVersion":"0.41.2"}],"fix":{"url":"https://github.com/open-telemetry/opentelemetry-js/commit/ffe641c08c69f41ca8d292221dc1804d511efb28","label":"open-telemetry/opentelemetry-js@ffe641c"},"references":[{"type":"WEB","url":"https://github.com/open-telemetry/opentelemetry-js/security/advisories/GHSA-f8pq-3926-8gx5"},{"type":"WEB","url":"https://github.com/open-telemetry/opentelemetry-js/commit/ffe641c08c69f41ca8d292221dc1804d511efb28"},{"type":"PACKAGE","url":"https://github.com/open-telemetry/opentelemetry-js"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2023-08-09T20:59:14Z"}}