Skip to content

Fix/security updates - #630

Merged
Ultra-Tech-code merged 14 commits into
masterfrom
fix/security-updates
Aug 10, 2026
Merged

Fix/security updates#630
Ultra-Tech-code merged 14 commits into
masterfrom
fix/security-updates

Conversation

@Ultra-Tech-code

Copy link
Copy Markdown
Contributor

Description

This PR remediates 50+ Dependabot security alerts across the afristore monorepo, achieving 0 vulnerabilities in the final npm audit report.

To fully address all high/critical alerts without triggering conflicts between hoisted Next.js internal dependencies, we upgraded the frontend from Next.js 14 to Next.js 16.3.0.

🛡️ Security Fixes

  • Next.js (16.3.0): Resolves multiple SSRF, DoS, XSS, Cache Poisoning, and Middleware bypass CVEs.
  • Axios (^1.9.0): Fixes SSRF (GHSA-wf5p-g6vw-rhxx) in both the frontend and indexer apps.
  • Concurrently (^10.0.4): Bumps past the shell-quote Quadratic DoS vulnerability.
  • Transitive Dependency Overrides: Forced minimum safe versions globally via the root package.json for:
    • postcss >=8.5.26 (Path Traversal, Source Map injection)
    • sharp >=0.35.3 (libvips integer overflows)
    • brace-expansion >=5.0.9 (DoS via exponential expansion)
    • js-yaml >=4.1.2 (Quadratic CPU via merge-key chains)
    • fast-uri >=4.1.2 (Host confusion)
    • ip-address >=10.5.0 (SSRF via decimal/octal leading-zero mismatch)

🛠️ Other Changes

  • Next.js Config: Migrated experimental.serverComponentsExternalPackages to the stable top-level serverExternalPackages required by Next.js 15+.
  • Test Suite Fixes: Cleaned up pre-existing syntax errors in e2e tests (royalties.spec.ts, settings.spec.ts) and applied strict any typing in RootErrorBoundary.
  • Lockfile Cleanup: Consolidated package-lock tracking to the root workspace and removed stale lockfiles.

Testing Instructions

  1. Run npm install from the root directory.
  2. Run npm audit (should report 0 vulnerabilities).
  3. Run npm --workspace=frontend/afristore-app run test to verify frontend units pass.
  4. Run npm --workspace=indexer run test to verify indexer units pass.

Remove spurious trailing ')' in template literal expressions in
royalties.spec.ts and close unclosed test block in settings.spec.ts.

Also type Sentry.withScope callback parameter as 'any' to satisfy
stricter TypeScript checking in RootErrorBoundary.
…alPackages

The experimental.serverComponentsExternalPackages option was promoted to
a stable top-level config key (serverExternalPackages) in Next.js 15+.
Move the @stellar/stellar-sdk and sodium-native entries accordingly to
avoid deprecation warnings and maintain compatibility with Next.js 16.
- Bump concurrently ^9.2.3 → ^10.0.4 to fix shell-quote DoS
  (GHSA-395f-4hp3-45gv)
- Tighten postcss override to >=8.5.26 (path traversal, XSS fixes)
- Add brace-expansion >=5.0.9 (DoS via exponential expansion)
- Add js-yaml >=4.1.2 (quadratic CPU via merge-key chains)
- Add fast-uri >=4.1.2 (host confusion via IDN / backslash)
- Add ip-address >=10.5.0 (SSRF via leading-zero octet mismatch)
- Add sharp >=0.35.3 (libvips CVE-2026-33327/33328/35590/35591)
- next 14.2.14 → 16.3.0 (resolves SSRF, DoS, middleware bypass,
  cache poisoning, XSS and HTTP smuggling CVEs)
- eslint-config-next 14.2.14 → 16.3.0
- eslint ^8.57.0 → ^9.0.0 (peer requirement of eslint-config-next 16)
- axios ^1.7.2 → ^1.9.0 (GHSA inherited proxy after interceptor cloning)
- postcss ^8.5.22 → ^8.5.26 (path traversal + sourceMappingURL XSS)
- Add overrides: brace-expansion, js-yaml, fast-uri, sharp
- axios ^1.15.2 → ^1.9.0 (GHSA: Node HTTP adapter inherits proxy
  after interceptor config cloning — GHSA-wf5p-g6vw-rhxx)
- Add ip-address >=10.5.0 override (SSRF via leading-zero octet
  decimal/octal mismatch — GHSA-mwp4-54f8-5fhr)
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
afristore-app Ready Ready Preview Aug 10, 2026 4:17pm

eslint-config-next@16.3.0 requires eslint>=9.0.0 exclusively, which
conflicts with the locked transitive deps in the workspace lockfile
and causes npm ci (strict mode) to fail in CI.

eslint-config-next@15.5.23 supports eslint ^7/^8/^9 — retaining full
compatibility with Next.js 16 rules while keeping eslint at ^8.57.0
so that npm ci passes without flags in both workspace subdirectories.

No security implications: eslint-config-next is a dev-time linting
tool with no runtime attack surface.
…ibility

Next.js 16 changed the 'next lint' CLI to require an explicit directory
argument. Without one, it resolves no such directory error in CI.

Change: 'next lint' → 'next lint .'
vitest 4.x uses rolldown, which requires platform-specific native bindings
(@rolldown/binding-linux-x64-gnu). These bindings are absent from the
macOS-generated lockfile, so npm ci on the Linux CI runner fails with
'Cannot find native binding'.

vitest 3.x uses Vite/esbuild (pure JS) — no native bindings needed.
All 199 indexer tests continue to pass.
@sentry/nextjs 10.55.0 attempts to load next/constants via an internal
require path that changed in Next.js 16, causing Jest to fail on startup.

Version 10.70.0 explicitly declares next 16 support in peerDependencies
and resolves the module path correctly.
- Update CI matrix to use Node 22 only to support concurrently@10.0.4.
- Sync root lockfile to properly track missing peer dependencies like eslint@8.57.1.
- Next 16 removes the `next lint` command, replaced script with direct `eslint` invocation.
- Removed overrides for brace-expansion and minimatch that were breaking ESLint file enumeration by forcing incompatible major versions.
@Ultra-Tech-code
Ultra-Tech-code merged commit c0d2c3f into master Aug 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant