generated from host-uk/core-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
lang:phpPHP/LaravelPHP/Laravel
Description
Description
The SetHadesCookie listener sets a Hades authentication cookie with a 1-year expiry, with no rotation mechanism.
Location
- File: src/Listeners/SetHadesCookie.php
- Lines: 27-38
Issue
The Hades cookie is set with:
- 1 year expiry (60 * 24 * 365 minutes)
- No rotation on activity
- Only revoked by changing HADES_TOKEN globally
This creates security concerns:
- Long-lived credentials are more likely to be compromised
- No way to revoke access for individual users
- Cookie theft gives year-long access
- No activity-based expiration
Recommendation
- Reduce cookie expiry to a reasonable duration (e.g., 24-48 hours)
- Implement cookie rotation on each request or at intervals
- Add per-user revocation capability (e.g., store user-specific tokens)
- Implement idle timeout that invalidates the cookie after inactivity
- Add device/session tracking to allow selective revocation
Severity
Medium - Long-lived credentials increase exposure window if compromised
Metadata
Metadata
Assignees
Labels
lang:phpPHP/LaravelPHP/Laravel