
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-133273 is an authentication bypass vulnerability in @fastify/swagger-ui that allows unauthenticated clients to access protected API specification files via the unprotected /static route. The vulnerability affects versions 2.1.0 through 6.1.4 of the npm package and was patched in version 6.1.5. It was published on November 20, 2026 by maintainer mcollina. It carries a CVSS v3.1 base score of 3.7 (Low) (GitHub Advisory).
The root cause is an incomplete application of authentication hooks (CWE-288: Authentication Bypass Using an Alternate Path or Channel). When baseDir is configured — as recommended in the README for bundling the Swagger UI — the @fastify/static instance mounted at /static/ serves all files in baseDir without applying the uiHooks (onRequest and preHandler) that protect the main documentation routes. This means any file accessible at the protected root path / is also reachable unauthenticated at /static/<filename> if an attacker knows or guesses the filename. The /json, /yaml, and UI page routes remain protected; only the static file serving path is affected (GitHub Advisory).
Exploitation allows an unauthenticated remote attacker to read API specification files (e.g., OpenAPI/Swagger definitions) that operators intended to protect behind documentation authentication. Access is strictly read-only — there is no integrity or availability impact. Exposed specification files may reveal internal API structure, endpoint details, authentication schemes, or sensitive parameter names, potentially aiding further reconnaissance or targeted attacks against the application (GitHub Advisory).
No public exploit code, active in-the-wild exploitation, or threat actor attribution has been reported for this vulnerability. The attack complexity is rated High, as an attacker must know or correctly guess the filename of a protected specification file. The vulnerability requires no privileges or user interaction and is remotely exploitable over the network. No EPSS score or CISA KEV catalog entry is currently associated with this CVE (GitHub Advisory).
@fastify/swagger-ui versions 2.1.0–6.1.4 with baseDir configured, and where documentation authentication (e.g., bearer token, API key header) is enforced via uiHooks./documentation) and confirm a 401/403 response, verifying that authentication is enforced./static/ path, such as /documentation/static/swagger.json, /documentation/static/openapi.yaml, or other known bundled asset names./documentation/static/<specfile> returns the file contents without requiring credentials, exposing the API specification (GitHub Advisory)./*/static/*.json, /*/static/*.yaml, or /*/static/*.yml from external or unexpected IP addresses, particularly without accompanying authentication headers./static/ sub-paths for specification files from clients that received 401/403 on the main documentation route; absence of Authorization or session cookie headers in those requests./static/ with varying filenames suggesting enumeration attempts (GitHub Advisory).Upgrade @fastify/swagger-ui to version 6.1.5 or later, which applies uiHooks to the /static route as well as all other plugin routes. If immediate upgrade is not possible, two workarounds are available: (1) register a Fastify authentication hook at a scope that covers the /static route before registering @fastify/swagger-ui, or (2) remove the baseDir configuration — without it, only the public bundled assets (not operator-supplied files) are served under /static/. Note that header-only bearer authentication schemes may require additional configuration after upgrading, as browsers send same-origin credentials automatically for basic/cookie auth but not for injected headers (GitHub Advisory).
The advisory was published by Fastify maintainer mcollina with AI assistance, and remediation was developed by UlisesGascon and reviewed by mcollina. The advisory references a prior related vulnerability, GHSA-62jr-84gf-wmg4 (CVE-2024-22207), which was an earlier file exposure issue in @fastify/swagger-ui's static serving, indicating a pattern of scrutiny on this component's static file handling (GitHub Advisory). No broader media coverage or notable community discussion has been identified at this time.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."