# CVE-2023-51663: Hail authentication can be bypassed by changing email address

> Attackers can bypass domain-based authentication by changing their email address, gaining unauthorized access to run jobs or create tenants in Hail Batch clusters.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 Dec 2023
- **Updated:** 17 Apr 2025
- **Also known as:** GHSA-487p-qx68-5vjw, PYSEC-2023-271

## What is CVE-2023-51663?

CVE-2023-51663 is a medium-severity authentication bypass vulnerability in hail-is hail, published on 29 Dec 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Hail is an open-source, general-purpose, Python-based data analysis tool with additional data types and methods for working with genomic data. Hail relies on OpenID Connect (OIDC) email addresses from ID tokens to verify the validity of a user's domain, but because users have the ability to change their email address, they could create accounts and use resources in clusters that they should not have access to. For example, a user could create a Microsoft or Google account and then change their email to `test@example.org`. This account can then be used to create a Hail Batch account in Hail Batch clusters whose organization domain is `example.org`. The attacker is not able to access private data or impersonate another user, but they would have the ability to run jobs if Hail Batch billing projects are enabled and create Azure Tenants if they have Azure Active Directory Administrator access.

Weakness: CWE-289 (Authentication Bypass by Alternate Name)

## Which versions are affected by CVE-2023-51663?

3 open source packages ship an affected version, including hail. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `hail` | PyPI | All versions | 0.2.127 |
| `hail` | PyPI | All versions | 0.2.127 |
| `hail` | PyPI | All versions | 0.2.127 |

Products: Hail Hail.

## How do I fix CVE-2023-51663?

Upgrade hail to 0.2.127 or later.

## Is CVE-2023-51663 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-51663 and fix it if it is affected.

What it is: CVE-2023-51663 is a medium-severity authentication bypass vulnerability in hail-is hail, published on 29 Dec 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-51663 in the wild and no public exploit code.

Affected packages and fixed versions:
- hail (PyPI): affected all versions; fixed in 0.2.127
- hail (PyPI): affected all versions; fixed in 0.2.127
- hail (PyPI): affected all versions; fixed in 0.2.127

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-2023-51663/ (Markdown: https://insights.sbomify.com/CVE-2023-51663/index.md)
```

## Sources

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

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