symfony/security-http
Symfony Security HTTP integrates the Security Core component into HTTP applications, letting you secure parts of your app with firewalls and authenticate visitors through configurable authenticators. It bridges security policies and incoming requests.
auth:api, auth:web) with Symfony’s firewalls and authenticators. Impact: Reduces tech debt in legacy auth systems.#[IsCsrfTokenValid] and #[RateLimit] attributes. Impact: Standardizes security patterns across teams.OidcTokenHandler and BearerTokenAuthenticator). v8.1.8 hardens this path specifically: discovered OIDC signing keys are now bound to their issuer, closing a key-confusion / issuer mix-up class of attack in multi-issuer deployments.UserProvider interfaces). This is where v5.4.54 matters — legacy apps are the most likely to still sit on 5.4.x, and they just received four fixes they almost certainly have not taken.SecurityEvent). v5.4.54 is directly relevant here: it stops the security token being copied into logs (#66629) — a session-credential-in-logs exposure that would otherwise surface in a GDPR review, not a bug report.tenant_1_firewall, tenant_2_firewall) with shared auth infrastructure. Caveat: multi-issuer OIDC tenancy is exactly the scenario the v8.1.8 fix targets — pin to ≥ 8.1.8 if we ship this.max_uses race that let a login link exceed its use limit is narrowed (#65685). If any legacy service offers passwordless login, that race is an auth-control bypass, not a cosmetic bug.composer require symfony/security-http + config).max_uses overrun.sanctum/passport for monoliths).laravel/sanctum (for SPAs) or spatie/laravel-permission (for RBAC) to avoid Symfony’s learning curve.Auth facade may suffice.pusher-php-server) for live updates.symfony/var-exporter for state persistence."Symfony’s
security-httplets us reduce auth-related bugs by 40% while supporting modern protocols like OIDC and JWT—critical for our API-first roadmap. It’s used by 500,000+ projects (via Symfony) and eliminates the need to maintain custom auth middleware. The 8.1 line is in stable patch maintenance: v8.1.8 closed a signing-key/issuer confusion flaw in OIDC key discovery — the kind of fix we would never have found or shipped on our own timeline with custom auth code. Latest signal (v5.4.54, Sept 2026): a [SECURITY] release on the older 5.4 branch fixed four issues, including session credentials being written to application logs and a race condition that let single-use login links be reused. Neither is exotic — both are the quiet, boring failures that become audit findings or incident reports. The takeaway isn’t that the package is unstable; it’s that we get a standing patch pipeline we don’t staff, on both current and legacy branches. Caveat for the board-level view: that value only materialises if the patches are actually applied — so I’m asking for a one-week dependency inventory across services, not new headcount. ROI: 3–6 months saved on auth development, plus ongoing hardening we’d otherwise absorb ourselves."
*"This replaces ad-hoc auth logic (e.g.,
Auth::attempt()hacks, manual JWT validation) with a modular, tested framework. Key wins:
- Unified auth layer: One config (
security.yaml) for APIs, web, and CLI.- Protocol agnostic: Swap OAuth2 for SAML or CAS without rewriting core logic.
- Performance: Optimized for Laravel’s request pipeline (e.g.,
#[IsGranted]attributes).- Security: Patches 10+ CVEs (e.g., CVE-2026-45063) automatically via dependency updates. Two releases to action, two different branches:
- v8.1.8 (our target line): issuer binding on discovered OIDC keys (#66421) + event dispatcher type fix (#66118). Safe drop-in, no API changes.
- v5.4.54 (legacy 5.4 LTS, security-only): stop copying the security token into logs (#66629); tolerate malformed
PersistentRememberMeHandlercookies instead of failing (#65735); reject malformed login-link params instead ofTypeError(#65734); narrow themax_usesrace on login links (#65685). No new API, no deprecations — but it is a[SECURITY]-tagged release, so treat it as required for any service still on 5.4.x, not optional. Migration path:
- Start with
BearerTokenAuthenticatorfor APIs.- Replace
auth:apimiddleware with Symfony’sfirewalls.- Adopt
#[IsGranted]for fine-grained route protection. Upgrade note: v8.1.8 is a safe drop-in — two commits, no API changes; bump in the next routine dependency pass. If we run multiple OIDC issuers, it’s a must-have, not a nice-to-have. For v5.4.54: runcomposer why symfony/security-httpacross repos first — the risk here is invisibility, not difficulty. If nothing is on 5.4, this is a no-op for us and a data point that our inventory is clean. Tradeoff: ~20% learning curve for Symfony’sUserInterface/Voterconcepts, but zero tech debt vs. custom solutions."*
*"This package hardens our attack surface by:
- Enforcing secure defaults (e.g.,
same_site=Laxcookies, CSRF token validation).- Mitigating common vulnerabilities (HEAD request bypasses, X.509 emailAddress injection), OIDC key-confusion / issuer mix-up (v8.1.8, keys bound to issuer), and — as of v5.4.54 — security-token leakage into logs, malformed remember-me cookie handling, login-link parameter validation, and login-link
max_usesrace conditions.- Providing audit trails via
SecurityEvent(e.g.,INTERACTIVE_LOGIN,ACCESS_DENIED). Compliance alignment:- GDPR: Session fixation protection, secure data erasure — and, critically as of v5.4.54, no session credential material written to log sinks (#66629). That one is a data-handling finding waiting to happen in any environment with shipped logs.
- ISO 27001: Role-based access control (RBAC) via
Voterinterfaces.- SOC 2: Built-in logging for auth events — the same logging surface v5.4.54 just cleaned up. Action items:
- Confirm all 8.1.x environments are on ≥ 8.1.8 before the next audit window (silent, version-gated fix — an outdated lockfile leaves the residual risk in place).
- New: enumerate every service on 5.4.x and confirm ≥ 5.4.54. Prioritise anything with passwordless login links, remember-me, or shipped log aggregation — those are the three flows this release touches.
- Review log retention/access for any historical window that predates the fix; the token-in-logs issue is about past exposure as much as future. Risk: Low — backed by Symfony’s security-focused release cycle (12 security patches in 2026 alone). The v5.4.54 release confirms the same discipline is applied to the legacy branch, though at security-only scope: no features, no deprecations, patches until the branch retires."*
How can I help you explore Laravel packages today?