{"answers":{"affected":"2 open source packages ship an affected version, including hfs.","exploited":"There is no known exploitation of GHSA-xcxh-6cv4-q8p8 in the wild and no public exploit code.","fix":"Upgrade hfs to 0.57.10 or later.","what":"GHSA-xcxh-6cv4-q8p8 is a vulnerability in hfs, published on 12 Aug 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-xcxh-6cv4-q8p8 and fix it if it is affected.\n\nWhat it is: GHSA-xcxh-6cv4-q8p8 is a vulnerability in hfs, published on 12 Aug 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-xcxh-6cv4-q8p8 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- hfs (npm): affected all versions; fixed in 0.57.10\n- hfs (npm): affected all versions; fixed in 0.57.10\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-xcxh-6cv4-q8p8/ (Markdown: https://insights.sbomify.com/GHSA-xcxh-6cv4-q8p8/index.md)","id":"GHSA-xcxh-6cv4-q8p8","markdown":"https://insights.sbomify.com/GHSA-xcxh-6cv4-q8p8/index.md","name":"GHSA-xcxh-6cv4-q8p8","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["security_bypass","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"HFS web application","requires_auth":"low_privilege","summary":"An attacker can hijack the HFS admin tab via a malicious web link, potentially leading to credential theft through phishing.","user_interaction":"required","vuln_class":"open_redirect"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Summary\nWhen adding a \"web link\" to the HFS virtual filesystem, the frontend opens it with `target=\"_blank\"` but without the `rel=\"noopener noreferrer\"` attribute. This allows the opened page to use the `window.opener` property to change the location of the original HFS tab.\n\n### Details\nWhile most modern browsers have fixes already implemented for this `target=\"_blank\"` exploit at the browser level, users on outdated browsers remain vulnerable. This means that if an admin of the HFS instance adds a link to an external third-party service (that they believe is safe at the time) and that service they added later becomes compromised, the malicious page could replace the original HFS tab's content with a phishing page. This does not require the admin account itself to be compromised, only that a legitimate linked site turns malicious.\n\n### Impact\nAffected users (people using old browsers without the browser level fix) could be misled into entering their HFS credentials or other sensitive information into a fake site controlled by an attacker. This vulnerability is fixed in most modern browsers, but adding `rel=\"noopener noreferrer\"` remains a best practice to protect legacy environments.\n\n### PoC\n\nFirstly, in the HFS admin page, under the filesystem (/~/admin/#/fs) press \"Add\" then \"web link\" then set the link to take the user to to an HTML file that exploits this vulnerability, here is an example of a malicious HTML file's code:\n\n```\u003chtml\u003e\n \u003cbody\u003e\n  \u003cscript\u003e\n    window.opener.location = \"https://example.org\";\n  \u003c/script\u003e\n\u003cb\u003eError loading...\u003c/b\u003e\n \u003c/body\u003e\n\u003c/html\u003e\n```\n\nNow, in the HFS folder you placed this web link in, open HFS and click the web link, if you aren't on a modern browser that fixed this vulnerability on the browser level, then switch back to the HFS tab that opened it, and you should be taken to \"https://example.org\" if you tried the code I provided, or whatever other page you tried.","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":"HFS user adding a \"web link\" in HFS is vulnerable to \"target=_blank\" exploit","id":"GHSA-xcxh-6cv4-q8p8","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"open_redirect","year":"2025"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["0.57.10"],"introduced":["0"],"last_affected":[],"package":"hfs","purl":null,"source":"GHSA-xcxh-6cv4-q8p8"},{"ecosystem":"npm","fixed":["0.57.10"],"introduced":["0"],"last_affected":[],"package":"hfs","purl":"pkg:npm/hfs","source":"GHSA-xcxh-6cv4-q8p8"}],"products":null,"published":"2025-08-12","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":"An attacker can hijack the HFS admin tab via a malicious web link, potentially leading to credential theft through phishing.","url":"https://insights.sbomify.com/GHSA-xcxh-6cv4-q8p8/"}