Vulnerabilities in pkg:npm/hfs
PACKAGEGHSA-xcxh-6cv4-q8p8 is a LOW hfs user adding a "web vulnerability (CWE-1022: Use of Web Link to Untrusted Target with window.opener Access) affecting Hfs libraries in the npm ecosystem. The issue involves hfs user adding a "web link" in hfs is vulnerable to "target=_blank" exploit. Remediation is available by upgrading affected packages to version 0.57.10.
pkg:npm/hfs
Vulnerability advisories affecting package pkg:npm/hfs. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-xcxh-6cv4-q8p8 | - | LOW | HFS user adding a "web link" in HFS is vulnerable to "target=_blank" exploit |
| GHSA-5f4x-hwv2-w9w2 | CVE-2024-39943 | HIGH | rejetto HFS vulnerable to OS Command Execution by remote authenticated users |
GHSA-xcxh-6cv4-q8p8 at a Glance
How to Fix GHSA-xcxh-6cv4-q8p8
To remediate this vulnerability, upgrade all affected Hfs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install hfs@0.57.10
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls hfs
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-xcxh-6cv4-q8p8, inspect your project dependencies using npm:
npm ls hfs
Analyze the terminal output to locate any version of Hfs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.57.10), your application is affected.
Note: The npm ls hfs command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1022: Use of Web Link to Untrusted Target with window.opener Access, where the web application produces links to untrusted external sites outside of its sphere of control, but it does not properly prevent the external site from modifying security-critical properties of the window.opener object, such as the location property. In Hfs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-xcxh-6cv4-q8p8 Affected Hfs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
hfs
|
npm |
< 0.57.10
|
0.57.10
|
References
Frequently Asked Questions
What is GHSA-xcxh-6cv4-q8p8?
Which Hfs versions are affected?
What version fixes GHSA-xcxh-6cv4-q8p8?
Is hfs affected?
What CWE is associated with GHSA-xcxh-6cv4-q8p8?
How can I check npm dependencies for GHSA-xcxh-6cv4-q8p8?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xcxh-6cv4-q8p8",
"modified" : "2025-08-12T20:23:55Z",
"published" : "2025-08-12T00:13:03Z",
"aliases" : [ ],
"summary" : "HFS user adding a \"web link\" in HFS is vulnerable to \"target=_blank\" exploit",
"details" : "### 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\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```<html>\n <body>\n <script>\n window.opener.location = \"https://example.org\";\n </script>\n<b>Error loading...</b>\n </body>\n</html>\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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "hfs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.57.10"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.57.9"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rejetto/hfs/security/advisories/GHSA-xcxh-6cv4-q8p8"
}, {
"type" : "WEB",
"url" : "https://github.com/rejetto/hfs/commit/6531bcd2ab285af88f91831e30d8a03f5b9fe20d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rejetto/hfs"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1022" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-08-12T00:13:03Z",
"nvd_published_at" : null
}
}