CVE-2026-6410是一个路径遍历漏洞,影响到Node.js的@fastify/static插件。当启用目录列表功能时,攻击者可以通过构造恶意请求访问Node.js进程可访问的任意目录,导致敏感信息泄露。该漏洞影响@fastify/static 8.0.0到9.1.0版本。建议升级至9.1.1版本或禁用目录列表功能以缓解风险。
CVE-2026-6410 影响 @fastify/static 的 8.0.0 到 9.1.0 版本。它允许未经身份验证的远程攻击者获取 Node.js 进程可访问的任意目录的目录列表。这是由于 dirList.path() 函数中的缺陷造成的,该函数使用 path.join() 解析目录,而没有进行适当的约束检查。虽然不泄露文件内容,但目录和文件名的泄露可用于收集有关应用程序结构的敏感信息,并可能进一步促进攻击。CVSS 严重性评级为 5.3,表明需要立即关注的中等风险。
攻击者可以通过向使用 @fastify/static 且 'list' 选项启用的 Fastify 应用程序发送精心制作的 HTTP 请求来利用此漏洞。通过操纵请求的路径,攻击者可以欺骗 dirList.path() 函数解析配置的根目录之外的目录,从而泄露目录内容。缺乏身份验证意味着任何远程用户都可以尝试利用此漏洞。利用难度较低,因为它不需要高级技术技能或特权访问。
Applications utilizing @fastify/static versions 8.0.0 through 9.1.0 with directory listing enabled are at risk. This includes Node.js applications serving static assets, particularly those deployed in production environments where security is paramount. Shared hosting environments using this plugin are also at increased risk due to the potential for cross-tenant exploitation.
• nodejs / server:
find / -name "@fastify/static" -exec grep -i 'dirList.path()' {} + | grep -i 'path.join()' • nodejs / server:
ps aux | grep -i '@fastify/static' | grep -i 'list: true'• generic web:
Use curl or wget to check for directory listing endpoints (e.g., /static/). A successful listing indicates potential exposure.
disclosure
漏洞利用状态
EPSS
0.02% (6% 百分位)
CISA SSVC
建议的解决方案是将 @fastify/static 依赖项升级到 9.1.1 或更高版本。此版本通过在 dirList.path() 函数中实现适当的约束检查来修复漏洞,从而防止在配置的根目录之外解析目录。强烈建议在生产环境中立即升级。或者,如果无法立即升级,则禁用 @fastify/static 中的 'list' 选项是一种临时缓解措施,尽管这会限制目录列表功能。
Actualice el paquete @fastify/static a la versión 9.1.1 o superior para solucionar la vulnerabilidad de path traversal. Como alternativa, desactive el listado de directorios eliminando la opción 'list' de la configuración del plugin.
漏洞分析和关键警报直接发送到您的邮箱。
'Path traversal' 是一种安全漏洞,允许攻击者访问应用程序预期根目录之外的文件或目录。
是的,此漏洞会影响使用受影响版本的 @fastify/static 且启用 'list' 选项的所有环境。
作为临时缓解措施,请在 @fastify/static 中禁用 'list' 选项。但是,这会限制目录列表功能。
静态和动态安全分析工具可以检测此漏洞。升级后建议进行全面的安全扫描。
您可以使用命令行中的 npm list @fastify/static 命令来验证版本。
CVSS 向量