Intel

AIKIDO-2026-858658

@fastify/static is vulnerable to Authorization Bypass

Authorization BypassCVE-2026-7120 Published 4 days ago

53

Medium Risk

This Affects:

JS@fastify/static
5.0.0 - 10.1.1
Fixed in 10.1.2
Are you affected? Scan for Free

TL;DR

@fastify/static evaluates the allowedPath callback against the raw request pathname before normalizing dot segments and duplicate slashes in the pathname used for file resolution. Non-canonical pathnames such as //file, /./file, or /public/../private/file bypass allowedPath filtering while still resolving to the intended file on disk. Applications that use allowedPath as a security boundary to restrict access to specific static files or path subtrees can unintentionally expose files that were meant to be denied. The fix runs allowedPath against the normalized request pathname.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you rely on the allowedPath callback to restrict access to static files.

Background info

@fastify/static is vulnerable to Authorization Bypass in versions 5.0.0 - 10.1.1.

How to fix this

Upgrade the @fastify/static library to the patch version.