Skip to main content

nextjs-middleware

Enables advanced request handling in Next.js with middleware for authentication, role-based access, and security configurations.

Install this skill

or
75/100

Security score

The nextjs-middleware skill was audited on May 21, 2026 and we found 9 security issues across 3 threat categories. Review the findings below before installing.

Categories Tested

Security Issues

medium line 228

Template literal with variable interpolation in command context

SourceSKILL.md
228return NextResponse.redirect(new URL(`/search/${query}`, request.url));
medium line 265

Template literal with variable interpolation in command context

SourceSKILL.md
265new URL(`/landing-${bucket}`, request.url)
medium line 311

Template literal with variable interpolation in command context

SourceSKILL.md
311(locale) => pathname.startsWith(`/${locale}/`) || pathname === `/${locale}`
medium line 319

Template literal with variable interpolation in command context

SourceSKILL.md
319new URL(`/${locale}${pathname}`, request.url)
low line 115

Access to .env file

SourceSKILL.md
115secret: process.env.NEXTAUTH_SECRET,
low line 418

Access to .env file

SourceSKILL.md
418secure: process.env.NODE_ENV === 'production',
low line 193

External URL reference

SourceSKILL.md
193'/legacy': 'https://legacy.example.com',
low line 257

External URL reference

SourceSKILL.md
257new URL(pathname.replace('/api/external', ''), 'https://api.example.com')
low line 366

External URL reference

SourceSKILL.md
366const allowedOrigins = ['https://example.com', 'https://app.example.com'];
Scanned on May 21, 2026
View Security Dashboard
Installation guide →