System access limited to authorized users and processes
Why it matters
CMMC 2.0 AC.L1-3.1.1 (NIST 800-171r2 3.1.1) requires that only authorized users and processes access organizational systems. Without enforced authentication on every sensitive route and API endpoint, any unauthenticated actor — a misconfigured crawler, a SSRF exploit, or a direct URL request — can read or exfiltrate Federal Contract Information. A single unguarded API endpoint in a DoD contractor's system is enough to trigger a CMMC assessment failure and jeopardize contract eligibility. CWE-306 (Missing Authentication for Critical Function) and OWASP A01 name this as the highest-severity access control failure class.
Severity rationale
Critical because unauthenticated route access exposes FCI to any network-reachable requester with zero credential requirements.
Remediation
Lock every API route and server-rendered page that touches FCI behind an authentication check. In middleware.ts, define an explicit allowlist of public paths and redirect all unmatched requests without a valid session:
// middleware.ts
const PUBLIC_PATHS = ['/', '/login', '/signup', '/api/auth']
export function middleware(request: NextRequest) {
const { pathname } = request.nextUrl
const isPublic = PUBLIC_PATHS.some(p => pathname.startsWith(p))
if (!isPublic && !request.cookies.get('session')) {
return NextResponse.redirect(new URL('/login', request.url))
}
return NextResponse.next()
}
export const config = {
matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'],
}
Verify the matcher pattern does not create bypass gaps for /api/* paths — test with a tool like curl -s against each protected route without a cookie.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the CMMC Level 1 Readiness Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cmmc:2.0 · AC.L1-3.1.1 — Authorized Access Control
- cwe · CWE-306 — Missing Authentication for Critical Function
- owasp:2021 · A01 — Broken Access Control
- nist:rev2 · SP-800-171 3.1.1 — Limit system access to authorized users
Taxons
History
- 2026-04-18·v1.0.0·Initial import from gov-cmmc-level-1·automated