{"answers":{"affected":"2 open source packages ship an affected version, including js-yaml.","exploited":"There is no known exploitation of GHSA-8j8c-7jfh-h6hx in the wild and no public exploit code.","fix":"Upgrade js-yaml to 3.13.1 or later.","what":"GHSA-8j8c-7jfh-h6hx is a code injection vulnerability in js-yaml, published on 4 Jun 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-8j8c-7jfh-h6hx and fix it if it is affected.\n\nWhat it is: GHSA-8j8c-7jfh-h6hx is a code injection vulnerability in js-yaml, published on 4 Jun 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-8j8c-7jfh-h6hx in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- js-yaml (npm): affected all versions; fixed in 3.13.1\n- js-yaml (npm): affected all versions; fixed in 3.13.1\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-8j8c-7jfh-h6hx/ (Markdown: https://insights.sbomify.com/GHSA-8j8c-7jfh-h6hx/index.md)","id":"GHSA-8j8c-7jfh-h6hx","markdown":"https://insights.sbomify.com/GHSA-8j8c-7jfh-h6hx/index.md","name":"GHSA-8j8c-7jfh-h6hx","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript YAML parser","requires_auth":"none","summary":"Attackers can execute arbitrary code via malicious YAML files processed by the vulnerable load function in the js-yaml library.","user_interaction":"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":"Versions of `js-yaml` prior to 3.13.1 are vulnerable to Code Injection. The `load()` function may execute arbitrary code injected through a malicious YAML file. Objects that have `toString` as key, JavaScript code as value and are used as explicit mapping keys allow attackers to execute the supplied code through the `load()` function. The `safeLoad()` function is unaffected.\n\nAn example payload is \n`{ toString: !\u003ctag:yaml.org,2002:js/function\u003e 'function (){return Date.now()}' } : 1` \nwhich returns the object \n{\n  \"1553107949161\": 1\n}\n\n## Recommendation\n\nUpgrade to version 3.13.1.","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":"Code Injection in js-yaml","id":"GHSA-8j8c-7jfh-h6hx","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2019"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["3.13.1"],"introduced":["0"],"last_affected":[],"package":"js-yaml","purl":null,"source":"GHSA-8j8c-7jfh-h6hx"},{"ecosystem":"npm","fixed":["3.13.1"],"introduced":["0"],"last_affected":[],"package":"js-yaml","purl":"pkg:npm/js-yaml","source":"GHSA-8j8c-7jfh-h6hx"}],"products":null,"published":"2019-06-04","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 via malicious YAML files processed by the vulnerable load function in the js-yaml library.","url":"https://insights.sbomify.com/GHSA-8j8c-7jfh-h6hx/"}