# GHSA-9phw-7h96-q3rv: scheb/two-factor-bundle bypass two-factor authentication with remember-me option

> Attackers can bypass two-factor authentication by manipulating session cookies when the remember-me feature is enabled, gaining unauthorized access.

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

## What is GHSA-9phw-7h96-q3rv?

GHSA-9phw-7h96-q3rv is an authentication bypass vulnerability in scheb/two-factor-bundle, published on 21 May 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

In versions prior to 3.26.0 and prior to 4.11.0 of the "scheb/two-factor-bundle" project, a security vulnerability allowed attackers to bypass two-factor authentication (2FA) using the remember_me cookie. When the remember_me checkbox was used during login, a "REMEMBERME" cookie was created. Upon redirection to the 2FA page, attackers could manipulate the SESSIONID key, granting access to the homepage "/" and gaining authentication without completing 2FA.

## Which versions are affected by GHSA-9phw-7h96-q3rv?

4 open source packages ship an affected version, including scheb/two-factor-bundle.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `scheb/two-factor-bundle` | Packagist | All versions | 3.26.0 |
| `scheb/two-factor-bundle` | Packagist | All versions | 3.26.0 |
| `scheb/two-factor-bundle` | Packagist | From 4.0.0 | 4.11.0 |
| `scheb/two-factor-bundle` | Packagist | From 4.0.0 | 4.11.0 |

## How do I fix GHSA-9phw-7h96-q3rv?

Upgrade scheb/two-factor-bundle to a fixed version for your release line: 3.26.0 or 4.11.0.

## Is GHSA-9phw-7h96-q3rv being exploited?

There is no known exploitation of GHSA-9phw-7h96-q3rv in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-9phw-7h96-q3rv and fix it if it is affected.

What it is: GHSA-9phw-7h96-q3rv is an authentication bypass vulnerability in scheb/two-factor-bundle, published on 21 May 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-9phw-7h96-q3rv in the wild and no public exploit code.

Affected packages and fixed versions:
- scheb/two-factor-bundle (Packagist): affected all versions; fixed in 3.26.0
- scheb/two-factor-bundle (Packagist): affected all versions; fixed in 3.26.0
- scheb/two-factor-bundle (Packagist): affected from 4.0.0; fixed in 4.11.0
- scheb/two-factor-bundle (Packagist): affected from 4.0.0; fixed in 4.11.0

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-9phw-7h96-q3rv/ (Markdown: https://insights.sbomify.com/GHSA-9phw-7h96-q3rv/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-9phw-7h96-q3rv

---
From sbomify Insights: https://insights.sbomify.com/GHSA-9phw-7h96-q3rv/
Summaries are generated and may contain mistakes; the official description above is the record.
