{"answers":{"affected":"1 open source package ship an affected version, including spacecookie.","exploited":"There is no known exploitation of HSEC-2025-0004 in the wild and no public exploit code.","fix":"Upgrade spacecookie to 1.0.0.3 or later.","what":"HSEC-2025-0004 is a path traversal vulnerability in spacecookie, published on 14 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for HSEC-2025-0004 and fix it if it is affected.\n\nWhat it is: HSEC-2025-0004 is a path traversal vulnerability in spacecookie, published on 14 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of HSEC-2025-0004 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- spacecookie (Hackage): affected from 0.2.0.0; fixed in 1.0.0.3\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/HSEC-2025-0004/ (Markdown: https://insights.sbomify.com/HSEC-2025-0004/index.md)","id":"HSEC-2025-0004","markdown":"https://insights.sbomify.com/HSEC-2025-0004/index.md","name":"HSEC-2025-0004","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Haskell path library","requires_auth":"none","summary":"Broken path sanitization in the spacecookie library allows attackers to bypass traversal protections and access or modify arbitrary files.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"# Broken Path Sanitization in spacecookie Library\n\nThe spacecookie library exposes the functions `sanitizePath` and `sanitizeIfNotUrl` intended to\nremove `..` components from paths which can be used to prevent path traversal attacks. Due to\nerroneous comparison code, this elimination is not actually performed which has been remedied\nin version 1.0.0.3 by properly comparing using `equalFilePath`.\n\nAny user of those respective functions of any version of spacecookie should upgrade to 1.0.0.3\nor later. Note that the spacecookie server executable included in the same package is not affected\nby the problem since a separate check would reject any malicious path that gets by `sanitizePath`.","ecosystems":["Hackage"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Broken Path Sanitization in spacecookie Library","id":"HSEC-2025-0004","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":null,"product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"Hackage","fixed":["1.0.0.3"],"introduced":["0.2.0.0"],"last_affected":[],"package":"spacecookie","purl":"pkg:hackage/spacecookie","source":"HSEC-2025-0004"}],"products":null,"published":"2025-11-14","related":[],"sources":[{"class":"open","licence":"CC0 1.0","name":"Haskell Security Response Team","prefix":"HSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Broken path sanitization in the spacecookie library allows attackers to bypass traversal protections and access or modify arbitrary files.","url":"https://insights.sbomify.com/HSEC-2025-0004/"}