# GHSA-q4xf-7fw5-4x8v: Laravel Hijacked authentication cookies vulnerability

> Attackers can maintain persistent access via hijacked remember-me cookies even after password resets or logouts, requiring an upgrade to invalidate stolen sessions.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 May 2024

## What is GHSA-q4xf-7fw5-4x8v?

GHSA-q4xf-7fw5-4x8v is an authentication bypass vulnerability in illuminate/auth, published on 15 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Laravel 4.1.26 introduces security improvements for "remember me" cookies. Before this update, if a remember cookie was hijacked by another malicious user, the cookie would remain valid for a long period of time, even after the true owner of the account reset their password, logged out, etc.

This change requires the addition of a new remember_token column to your users (or equivalent) database table. After this change, a fresh token will be assigned to the user each time they login to your application. The token will also be refreshed when the user logs out of the application. The implications of this change are: if a "remember me" cookie is hijacked, simply logging out of the application will invalidate the cookie.

## Which versions are affected by GHSA-q4xf-7fw5-4x8v?

2 open source packages ship an affected version, including illuminate/auth.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `illuminate/auth` | Packagist | From 4.0.0 | 4.1.26 |
| `illuminate/auth` | Packagist | From 4.0.0 | 4.1.26 |

## How do I fix GHSA-q4xf-7fw5-4x8v?

Upgrade illuminate/auth to 4.1.26 or later.

## Is GHSA-q4xf-7fw5-4x8v being exploited?

There is no known exploitation of GHSA-q4xf-7fw5-4x8v in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-q4xf-7fw5-4x8v and fix it if it is affected.

What it is: GHSA-q4xf-7fw5-4x8v is an authentication bypass vulnerability in illuminate/auth, published on 15 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-q4xf-7fw5-4x8v in the wild and no public exploit code.

Affected packages and fixed versions:
- illuminate/auth (Packagist): affected from 4.0.0; fixed in 4.1.26
- illuminate/auth (Packagist): affected from 4.0.0; fixed in 4.1.26

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-q4xf-7fw5-4x8v/ (Markdown: https://insights.sbomify.com/GHSA-q4xf-7fw5-4x8v/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-q4xf-7fw5-4x8v

---
From sbomify Insights: https://insights.sbomify.com/GHSA-q4xf-7fw5-4x8v/
Summaries are generated and may contain mistakes; the official description above is the record.
