# GHSA-7fjv-25q9-2w88: State Guessing Vulnerability in laravel/socialite

> Attackers can guess OAuth state values to hijack user sessions in the Laravel Socialite library, requiring an upgrade to secure authentication.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 15 May 2024

## What is GHSA-7fjv-25q9-2w88?

GHSA-7fjv-25q9-2w88 is an authentication bypass vulnerability in laravel/socialite, published on 15 May 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

laravel/socialite versions prior to 2.0.10 are susceptible to a security vulnerability related to state guessing during OAuth authentication. This vulnerability could potentially lead to session hijacking, allowing attackers to compromise user sessions. The issue has been addressed and fixed in version 2.0.10.

## Which versions are affected by GHSA-7fjv-25q9-2w88?

2 open source packages ship an affected version, including laravel/socialite.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `laravel/socialite` | Packagist | From 1.0.0 | 2.0.10 |
| `laravel/socialite` | Packagist | From 1.0.0 | 2.0.10 |

## How do I fix GHSA-7fjv-25q9-2w88?

Upgrade laravel/socialite to 2.0.10 or later.

## Is GHSA-7fjv-25q9-2w88 being exploited?

There is no known exploitation of GHSA-7fjv-25q9-2w88 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-7fjv-25q9-2w88 and fix it if it is affected.

What it is: GHSA-7fjv-25q9-2w88 is an authentication bypass vulnerability in laravel/socialite, published on 15 May 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-7fjv-25q9-2w88 in the wild and no public exploit code.

Affected packages and fixed versions:
- laravel/socialite (Packagist): affected from 1.0.0; fixed in 2.0.10
- laravel/socialite (Packagist): affected from 1.0.0; fixed in 2.0.10

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-7fjv-25q9-2w88/ (Markdown: https://insights.sbomify.com/GHSA-7fjv-25q9-2w88/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-7fjv-25q9-2w88

---
From sbomify Insights: https://insights.sbomify.com/GHSA-7fjv-25q9-2w88/
Summaries are generated and may contain mistakes; the official description above is the record.
