Skip to content

build(deps): update dependency @fastify/static to v10 [security] - #628

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-fastify-static-vulnerability
Open

build(deps): update dependency @fastify/static to v10 [security]#628
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-fastify-static-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
@fastify/static 8.2.010.1.2 age confidence

@​fastify/static vulnerable to route guard bypass via encoded path separators

CVE-2026-6414 / GHSA-x428-ghpx-8j92

More information

Details

Impact

@fastify/static v9.1.0 and earlier decodes percent-encoded path separators (%2F) before filesystem resolution, but Fastify's router treats them as literal characters. This creates a routing mismatch: route guards on /admin/* do not match /admin%2Fsecret.html, but @​fastify/static decodes it to /admin/secret.html and serves the file.

Applications that rely on route-based middleware or guards to protect files served by @​fastify/static can be bypassed with encoded path separators.

Patches

Upgrade to @fastify/static >= 9.1.1.

Workarounds

None. Upgrade to the patched version.

Severity

  • CVSS Score: 5.9 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


@​fastify/static vulnerable to path traversal in directory listing

CVE-2026-6410 / GHSA-pr96-94w5-mx2h

More information

Details

Impact

@fastify/static v9.1.0 and earlier serves directory listings outside the configured static root when the list option is enabled. A request such as /public/../outside/ causes dirList.path() to resolve a directory outside the root via path.join() without a containment check.

A remote unauthenticated attacker can obtain directory listings for arbitrary directories accessible to the Node.js process, disclosing directory names and filenames that should not be exposed. File contents are not disclosed.

Patches

Upgrade to @fastify/static >= 9.1.1.

Workarounds

Disable directory listing by removing the list option from the plugin configuration.

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


@​fastify/static vulnerable to Authorization Bypass via Non-Canonical URL Paths

CVE-2026-7120 / GHSA-8pvw-jcv7-9cmj

More information

Details

Impact

@fastify/static evaluates the allowedPath callback 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 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 may unintentionally expose files that were intended to be denied.

Patches

Upgrade to @fastify/static >= 10.1.2.

Workarounds

None. Upgrade to the patched version.

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


@​fastify/static vulnerable to route guard bypass via path traversal

CVE-2026-15074 / GHSA-83w8-p2f5-377r

More information

Details

Impact

@fastify/static is vulnerable to a bypass of route-based middleware and guards via non-leading .. and %2E%2E path segments. find-my-way does not normalize .. when matching routes, so a request such as /foo/../deep/secret.txt matches the static plugin's catch-all instead of the guarded /deep/*. The getPathnameForSend helper introduced by the fix for GHSA-x428-ghpx-8j92 only guards against the %2F variant; .. and %2E%2E survive the decodeURI + encodeURI round-trip and are then collapsed away by @fastify/send's path.normalize before its own traversal guard runs.

Applications that rely on route-based middleware or guards to protect files served by @fastify/static can be bypassed with non-leading dot-dot path segments.

Patches

Upgrade to @fastify/static 10.1.1.

Workarounds

Do not use route-based middlewares or guards to protect files served by @fastify/static.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

fastify/fastify-static (@​fastify/static)

v10.1.2

Compare Source

⚠️ Security Release
What's Changed

Full Changelog: fastify/fastify-static@v10.1.1...v10.1.2

v10.1.1

Compare Source

⚠️ Security Release
What's Changed

Full Changelog: fastify/fastify-static@v10.1.0...v10.1.1

v10.1.0

Compare Source

What's Changed

New Contributors

Full Changelog: fastify/fastify-static@v10.0.0...v10.1.0

v10.0.0

Compare Source

Breaking Changes

  • setHeaders now using FastifyReply instead of Response.

You should refactor your code to use the reply helpers.
For example,

// Before
const fastify = require('fastify')({logger: true})
const path = require('node:path')

fastify.register(require('@​fastify/static'), {
  root: path.join(__dirname, 'public'),
  prefix: '/public/', // optional: default '/',
  setHeaders(res) {
    res.setHeader('X-Test', 'Foo')
  }
})
// After
const fastify = require('fastify')({logger: true})
const path = require('node:path')

fastify.register(require('@​fastify/static'), {
  root: path.join(__dirname, 'public'),
  prefix: '/public/', // optional: default '/',
  setHeaders(reply) {
    reply.header('X-Test', 'Foo')
  }
})

What's Changed

New Contributors

Full Changelog: fastify/fastify-static@v9.3.0...v10.0.0

v9.3.0

Compare Source

What's Changed

  • chore: update fastify-plugin dependency to version 6.0.0 by @​Puppo in #​594

New Contributors

Full Changelog: fastify/fastify-static@v9.2.0...v9.3.0

v9.2.0

Compare Source

What's Changed

New Contributors

Full Changelog: fastify/fastify-static@v9.1.3...v9.2.0

v9.1.3

Compare Source

What's Changed

Full Changelog: fastify/fastify-static@v9.1.2...v9.1.3

v9.1.2

Compare Source

What's Changed

Full Changelog: fastify/fastify-static@v9.1.1...v9.1.2

v9.1.1

Compare Source

⚠️ Security Release

This fixes CVE CVE-2026-6410 GHSA-pr96-94w5-mx2h.
This fixes CVE CVE-2026-6414 GHSA-x428-ghpx-8j92.

What's Changed

Full Changelog: fastify/fastify-static@v9.1.0...v9.1.1

v9.1.0

Compare Source

What's Changed

New Contributors

Full Changelog: fastify/fastify-static@v9.0.0...v9.1.0

v9.0.0

Compare Source

What's Changed

Full Changelog: fastify/fastify-static@v8.3.0...v9.0.0

v8.3.0

Compare Source

What's Changed

New Contributors

Full Changelog: fastify/fastify-static@v8.2.0...v8.3.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the security Pull requests that address a security vulnerability label Apr 17, 2026
@renovate
renovate Bot requested a review from a team April 17, 2026 00:39
@codecov

codecov Bot commented Apr 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.06%. Comparing base (1351342) to head (dfdec86).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #628   +/-   ##
=======================================
  Coverage   81.06%   81.06%           
=======================================
  Files          19       19           
  Lines         301      301           
=======================================
  Hits          244      244           
  Misses         57       57           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@renovate renovate Bot changed the title build(deps): update dependency @fastify/static to v9 [security] build(deps): update dependency @fastify/static to v9 [security] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate
renovate Bot deleted the renovate/npm-fastify-static-vulnerability branch April 27, 2026 16:46
@renovate renovate Bot changed the title build(deps): update dependency @fastify/static to v9 [security] - autoclosed build(deps): update dependency @fastify/static to v9 [security] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate
renovate Bot force-pushed the renovate/npm-fastify-static-vulnerability branch 2 times, most recently from 5dae8cf to 59c08c6 Compare April 27, 2026 20:09
@renovate
renovate Bot force-pushed the renovate/npm-fastify-static-vulnerability branch from 59c08c6 to dfdec86 Compare July 28, 2026 18:36
@renovate renovate Bot changed the title build(deps): update dependency @fastify/static to v9 [security] build(deps): update dependency @fastify/static to v10 [security] Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Pull requests that address a security vulnerability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants