# CVE-2024-11023: Session Hijacking in Firebase JavaScript SDK

> Attackers can hijack user sessions by manipulating the Firebase defaults cookie to redirect authentication tokens to a malicious server.

- **Severity:** Medium 5.2 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:A/VC:L/VI:L/VA:L/SC:H/SI:H/SA:H`)
- **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:** 18 Nov 2024
- **Updated:** 18 Nov 2024
- **Also known as:** GHSA-3wf4-68gx-mph8

## What is CVE-2024-11023?

CVE-2024-11023 is a medium-severity authentication bypass vulnerability in Firebase JavaScript SDK, published on 18 Nov 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

Firebase JavaScript SDK utilizes a "FIREBASE_DEFAULTS" cookie to store configuration data, including an "_authTokenSyncURL" field used for session synchronization.  If this cookie field is preset via an attacker by any other method, the attacker can manipulate the "_authTokenSyncURL" to point to their own server and it would allow an actor to capture user session data transmitted by the SDK. We recommend upgrading Firebase JS SDK at least to 10.9.0.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2024-11023?

2 open source packages ship an affected version, including firebase. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `firebase` | npm | All versions | 10.9.0 |
| `firebase` | npm | All versions | 10.9.0 |

Products: Google Firebase Javascript Sdk.

## How do I fix CVE-2024-11023?

Upgrade firebase to 10.9.0 or later.

## Is CVE-2024-11023 being exploited?

There is no known exploitation of CVE-2024-11023 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-11023 and fix it if it is affected.

What it is: CVE-2024-11023 is a medium-severity authentication bypass vulnerability in Firebase JavaScript SDK, published on 18 Nov 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 CVE-2024-11023 in the wild and no public exploit code.

Affected packages and fixed versions:
- firebase (npm): affected all versions; fixed in 10.9.0
- firebase (npm): affected all versions; fixed in 10.9.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/CVE-2024-11023/ (Markdown: https://insights.sbomify.com/CVE-2024-11023/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-11023
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-11023
- OSV: https://osv.dev/vulnerability/CVE-2024-11023

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-11023/
Summaries are generated and may contain mistakes; the official description above is the record.
