{"answers":{"affected":"2 open source packages ship an affected version, including @opentelemetry/instrumentation.","exploited":"There is no known exploitation of GHSA-f8pq-3926-8gx5 in the wild and no public exploit code.","fix":"Upgrade @opentelemetry/instrumentation to 0.41.2 or later.","what":"GHSA-f8pq-3926-8gx5 is a code injection vulnerability in @opentelemetry/instrumentation, published on 9 Aug 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-f8pq-3926-8gx5 and fix it if it is affected.\n\nWhat it is: GHSA-f8pq-3926-8gx5 is a code injection vulnerability in @opentelemetry/instrumentation, published on 9 Aug 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-f8pq-3926-8gx5 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @opentelemetry/instrumentation (npm): affected from 0.40.0; fixed in 0.41.2\n- @opentelemetry/instrumentation (npm): affected from 0.40.0; fixed in 0.41.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-f8pq-3926-8gx5/ (Markdown: https://insights.sbomify.com/GHSA-f8pq-3926-8gx5/index.md)","id":"GHSA-f8pq-3926-8gx5","markdown":"https://insights.sbomify.com/GHSA-f8pq-3926-8gx5/index.md","name":"GHSA-f8pq-3926-8gx5","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"OpenTelemetry instrumentation","requires_auth":"none","summary":"Attackers can execute arbitrary code if user input is passed to import() when using the OpenTelemetry instrumentation loader.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"## 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","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Unsanitized user controlled input in module generation","id":"GHSA-f8pq-3926-8gx5","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2023"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["0.41.2"],"introduced":["0.40.0"],"last_affected":[],"package":"@opentelemetry/instrumentation","purl":null,"source":"GHSA-f8pq-3926-8gx5"},{"ecosystem":"npm","fixed":["0.41.2"],"introduced":["0.40.0"],"last_affected":[],"package":"@opentelemetry/instrumentation","purl":"pkg:npm/%40opentelemetry/instrumentation","source":"GHSA-f8pq-3926-8gx5"}],"products":null,"published":"2023-08-09","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can execute arbitrary code if user input is passed to import() when using the OpenTelemetry instrumentation loader.","url":"https://insights.sbomify.com/GHSA-f8pq-3926-8gx5/"}