Releases: muneebs/csrf-armor
@csrf-armor/nextjs@1.4.4
Patch Changes
-
#54
e3da9dcThanks @muneebs! - fix(react): remove unnecessarycsrfTokendependency fromuseCallbacksecureFetchpreviously listedcsrfTokenin itsuseCallbackdependency array, causing the function reference to change every time the token updated. This made theCsrfContextValueunstable and triggered unnecessary re-renders in any component consuminguseCsrf().The token equality check (
newToken !== csrfToken) was also redundant because React'ssetStatealready bails out for identical primitive values. Removing both the dependency and the comparison fixes the re-render issue without changing behavior.Fixes #53
@csrf-armor/nuxt@1.1.2
Patch Changes
-
#50
7d4adebThanks @muneebs! - fix(client): preserve headers whencsrfFetchis called with aRequestobjectcsrfFetchpreviously only read headers from theinitargument, so when it was called with a fullRequestobject (e.g.csrfFetch(new Request(url, { headers }))), the Request's headers were stripped. It now merges headers from the Request, then theinitargument, then the CSRF headers (CSRF headers always take precedence), makingcsrfFetcha drop-in replacement forfetch.Fixes #49
-
#52
440e0afThanks @muneebs! - chore(deps): patch transitive dev dependency security advisoriesBumps pnpm overrides for
vite(^6.4.1→^6.4.2) andunhead(>=2.1.11→>=2.1.13) to pull in patched versions. These are dev/build-time dependencies only — no runtime behavior or published API changes.Addresses:
- GHSA: Vite arbitrary file read via dev server WebSocket (high, <=6.4.1)
- GHSA: Vite path traversal in optimized deps
.maphandling (medium, <=6.4.1) - GHSA: Unhead
hasDangerousProtocol()bypass via leading-zero padded HTML entities inuseHeadSafe()(medium, <2.1.13)
-
Updated dependencies [
440e0af]:- @csrf-armor/core@1.2.3
@csrf-armor/nextjs@1.4.3
Patch Changes
-
#50
7d4adebThanks @muneebs! - fix(client): preserve headers whencsrfFetchis called with aRequestobjectcsrfFetchpreviously only read headers from theinitargument, so when it was called with a fullRequestobject (e.g.csrfFetch(new Request(url, { headers }))), the Request's headers were stripped. It now merges headers from the Request, then theinitargument, then the CSRF headers (CSRF headers always take precedence), makingcsrfFetcha drop-in replacement forfetch.Fixes #49
-
#52
440e0afThanks @muneebs! - chore(deps): patch transitive dev dependency security advisoriesBumps pnpm overrides for
vite(^6.4.1→^6.4.2) andunhead(>=2.1.11→>=2.1.13) to pull in patched versions. These are dev/build-time dependencies only — no runtime behavior or published API changes.Addresses:
- GHSA: Vite arbitrary file read via dev server WebSocket (high, <=6.4.1)
- GHSA: Vite path traversal in optimized deps
.maphandling (medium, <=6.4.1) - GHSA: Unhead
hasDangerousProtocol()bypass via leading-zero padded HTML entities inuseHeadSafe()(medium, <2.1.13)
-
Updated dependencies [
440e0af]:- @csrf-armor/core@1.2.3
@csrf-armor/express@1.2.3
Patch Changes
-
#52
440e0afThanks @muneebs! - chore(deps): patch transitive dev dependency security advisoriesBumps pnpm overrides for
vite(^6.4.1→^6.4.2) andunhead(>=2.1.11→>=2.1.13) to pull in patched versions. These are dev/build-time dependencies only — no runtime behavior or published API changes.Addresses:
- GHSA: Vite arbitrary file read via dev server WebSocket (high, <=6.4.1)
- GHSA: Vite path traversal in optimized deps
.maphandling (medium, <=6.4.1) - GHSA: Unhead
hasDangerousProtocol()bypass via leading-zero padded HTML entities inuseHeadSafe()(medium, <2.1.13)
-
Updated dependencies [
440e0af]:- @csrf-armor/core@1.2.3
@csrf-armor/core@1.2.3
Patch Changes
-
#52
440e0afThanks @muneebs! - chore(deps): patch transitive dev dependency security advisoriesBumps pnpm overrides for
vite(^6.4.1→^6.4.2) andunhead(>=2.1.11→>=2.1.13) to pull in patched versions. These are dev/build-time dependencies only — no runtime behavior or published API changes.Addresses:
- GHSA: Vite arbitrary file read via dev server WebSocket (high, <=6.4.1)
- GHSA: Vite path traversal in optimized deps
.maphandling (medium, <=6.4.1) - GHSA: Unhead
hasDangerousProtocol()bypass via leading-zero padded HTML entities inuseHeadSafe()(medium, <2.1.13)
@csrf-armor/nuxt@1.1.1
Patch Changes
-
#46
2eded88Thanks @muneebs! - fix: resolve high/moderate severity vulnerabilities in transitive dependenciesAdded pnpm overrides to force patched versions of
lodash(>=4.18.0) anddefu(>=6.1.5), which were pulled in transitively through the nuxt dependency chain. Addresses GHSA-r5fr-rjxr-66jc (lodash code injection), GHSA-f23m-r3pf-42rh (lodash prototype pollution), and GHSA-737v-mqg7-c878 (defu prototype pollution). -
Updated dependencies [
2eded88]:- @csrf-armor/core@1.2.2
@csrf-armor/nextjs@1.4.2
Patch Changes
-
#46
2eded88Thanks @muneebs! - fix: resolve high/moderate severity vulnerabilities in transitive dependenciesAdded pnpm overrides to force patched versions of
lodash(>=4.18.0) anddefu(>=6.1.5), which were pulled in transitively through the nuxt dependency chain. Addresses GHSA-r5fr-rjxr-66jc (lodash code injection), GHSA-f23m-r3pf-42rh (lodash prototype pollution), and GHSA-737v-mqg7-c878 (defu prototype pollution). -
Updated dependencies [
2eded88]:- @csrf-armor/core@1.2.2
@csrf-armor/express@1.2.2
Patch Changes
-
#46
2eded88Thanks @muneebs! - fix: resolve high/moderate severity vulnerabilities in transitive dependenciesAdded pnpm overrides to force patched versions of
lodash(>=4.18.0) anddefu(>=6.1.5), which were pulled in transitively through the nuxt dependency chain. Addresses GHSA-r5fr-rjxr-66jc (lodash code injection), GHSA-f23m-r3pf-42rh (lodash prototype pollution), and GHSA-737v-mqg7-c878 (defu prototype pollution). -
Updated dependencies [
2eded88]:- @csrf-armor/core@1.2.2
@csrf-armor/core@1.2.2
Patch Changes
-
#46
2eded88Thanks @muneebs! - fix: resolve high/moderate severity vulnerabilities in transitive dependenciesAdded pnpm overrides to force patched versions of
lodash(>=4.18.0) anddefu(>=6.1.5), which were pulled in transitively through the nuxt dependency chain. Addresses GHSA-r5fr-rjxr-66jc (lodash code injection), GHSA-f23m-r3pf-42rh (lodash prototype pollution), and GHSA-737v-mqg7-c878 (defu prototype pollution).
@csrf-armor/nuxt@1.1.0
Minor Changes
-
#40
4fdec35Thanks @muneebs! - Add@csrf-armor/nuxtmodule for Nuxt 3/4 applicationsIntroduces a new Nuxt module that provides server-side CSRF protection via a Nitro middleware and client-side utilities for token management.
Features:
NuxtAdapterbridges H3 events with the framework-agnostic@csrf-armor/coreengine- Server middleware automatically enforces CSRF protection on all mutating requests
useCsrfTokencomposable for SSR-safe token access viauseStateuseCsrfFetchcomposable wrapping$fetchwith automatic CSRF token injection- Client plugin initialises the token on page load
- Full support for all core strategies:
double-submit,signed-double-submit,signed-token,origin-check,hybrid - Zero runtime dependencies — uses H3Event native Web API (
event.method,event.headers,event.path) and Node.js built-ins instead of h3 helper functions