{"answers":{"affected":"2 open source packages ship an affected version, including csrf-csrf.","exploited":"There is no known exploitation of GHSA-jjmg-x456-w976 in the wild and no public exploit code.","fix":"Upgrade csrf-csrf to 2.2.1 or later.","what":"GHSA-jjmg-x456-w976 is a vulnerability in csrf-csrf, published on 10 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-jjmg-x456-w976 and fix it if it is affected.\n\nWhat it is: GHSA-jjmg-x456-w976 is a vulnerability in csrf-csrf, published on 10 Oct 2022. 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-jjmg-x456-w976 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- csrf-csrf (npm): affected all versions; fixed in 2.2.1\n- csrf-csrf (npm): affected all versions; fixed in 2.2.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-jjmg-x456-w976/ (Markdown: https://insights.sbomify.com/GHSA-jjmg-x456-w976/index.md)","id":"GHSA-jjmg-x456-w976","markdown":"https://insights.sbomify.com/GHSA-jjmg-x456-w976/index.md","name":"GHSA-jjmg-x456-w976","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"npm cookie library","requires_auth":"none","summary":"Incorrect default cookie prefix allows bypassing __Host- security protections, potentially enabling cross-site request forgery or cookie manipulation.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"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_What kind of vulnerability is it? Who is impacted?_\n\nThe default cookie name (and documentation recommendation) was prefixed with `Host__` instead of `__Host-`. The point of this prefix is for additional security, to ensure that, when no domain option is provided in the cookie options, we can guarantee the cookie came from the correct domain.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nYes, the problem is patched from version 2.2.1, this will not be back ported, but you can use the workaround described below.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nYou can work around this by providing a custom `cookieName` as part of the options, which is correctly prefixed with `__Host-`.\n\n### References\n_Are there any links users can visit to find out more?_\n\nhttps://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#cookie-with-__host-prefix\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Reach out on the [Psifi Solutions Discord](https://psifisolutions.com/discord) in the `#psifi-support` channel","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":"Incorrect default cookie name and recommendation","id":"GHSA-jjmg-x456-w976","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"security_feature_bypass","year":"2022"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["2.2.1"],"introduced":["0"],"last_affected":[],"package":"csrf-csrf","purl":null,"source":"GHSA-jjmg-x456-w976"},{"ecosystem":"npm","fixed":["2.2.1"],"introduced":["0"],"last_affected":[],"package":"csrf-csrf","purl":"pkg:npm/csrf-csrf","source":"GHSA-jjmg-x456-w976"}],"products":null,"published":"2022-10-10","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":"Incorrect default cookie prefix allows bypassing __Host- security protections, potentially enabling cross-site request forgery or cookie manipulation.","url":"https://insights.sbomify.com/GHSA-jjmg-x456-w976/"}