Vulnerabilities in pkg:pypi/hail
PACKAGECVE-2023-51663 is a MODERATE (CVSS 5.3) hail relies on oidc email vulnerability (CWE-289: Authentication Bypass by Alternate Name) affecting Hail libraries in the PyPI ecosystem. The issue involves hail relies on oidc email claims to verify the validity of a user's domain.. Remediation is available by upgrading affected packages to version 0.2.127.
pkg:pypi/hail
Vulnerability advisories affecting package pkg:pypi/hail. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-487p-qx68-5vjw | CVE-2023-51663 | MODERATE | Hail relies on OIDC email claims to verify the validity of a user's domain. |
CVE-2023-51663 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2023-51663
To remediate this vulnerability, upgrade all affected Hail dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install hail>=0.2.127
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show hail
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2023-51663, inspect your installed packages using pip:
pip show hail
Analyze the terminal output to locate any version of Hail in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.127), your application is affected.
Note: The pip show hail command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-289: Authentication Bypass by Alternate Name, where the product performs authentication based on the name of a resource being accessed, or the name of the actor performing the access, but it does not properly check all possible names for that resource or actor. In Hail, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-51663 Affected Hail Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
hail
|
PyPI |
< 0.2.127
|
0.2.127
|
References
Frequently Asked Questions
What is CVE-2023-51663?
Which Hail versions are affected?
What version fixes CVE-2023-51663?
Is hail affected?
What is the CVSS score of CVE-2023-51663?
What CWE is associated with CVE-2023-51663?
How can I check PyPI dependencies for CVE-2023-51663?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-487p-qx68-5vjw",
"modified" : "2024-11-22T17:59:30Z",
"published" : "2024-01-02T16:40:58Z",
"aliases" : [ "CVE-2023-51663" ],
"summary" : "Hail relies on OIDC email claims to verify the validity of a user's domain.",
"details" : "### Impact\n\nAll Hail Batch clusters are affected. An attacker is able to:\n\n1. Create one or more accounts with Hail Batch without corresponding real accounts in the organization.\n\nFor example, a user could create a Microsoft or Google account and then change their email to \"inconspicuous@example.org\". This Microsoft or Google account can then be used to create a Hail Batch account in Hail Batch clusters whose organization domain is \"example.org\".\n\nIn Google, this attack is partially mitigated because Google requires users to verify ownership of their Google account. However, a valid user is able to create multiple distinct Hail Batch accounts by creating multiple distinct Google accounts using email addresses of the form \"real_user_email_name+random_id@example.org\".\n\nIn Microsoft, this attack requires Azure AD Administrator access to an Azure AD Tenant. The Azure AD Administrator is permitted to change the email address of an account to any other email address without verification. An attacker can create an Azure Tenant for free.\n\n1. The attacker *does not* have access to any private data (because the new service principals or service accounts are not granted any privileges).\n3. If trial Hail Batch billing projects are enabled, the attacker *does* have the ability to run jobs and thus spend money. An attacker can create as many accounts as Microsoft or Google permit.\n4. The attacker *cannot* impersonate another user because, in Azure, we use the `sub` from the OAuth2 response, and, in Google, Google does an email verification.\n\n### Remediation\n\n1. Apply this patch to prevent third-party attackers from creating accounts.\n2. Audit your users list https://auth.example.org/users for user accounts whose login ids are not valid login ids with your identity provider. Delete such users.\n\nA forthcoming change will prevent users from creating multiple accounts using Google's `+` email redirection.\n\n### Workarounds\nNone.\n\n### References\n1. https://trufflesecurity.com/blog/google-oauth-is-broken-sort-of/\n2. https://www.descope.com/blog/post/noauth\n4. https://developers.google.com/identity/openid-connect/openid-connect#an-id-tokens-payload\n5. https://learn.microsoft.com/en-us/entra/identity-platform/access-token-claims-reference#payload-claims\n\n[1] Hail Batch must separately stop using emails and start using the OAuth2 `sub` in Google. This is a known deficiency. In particular, if an email is re-used by the organization for a new user, the new user could access the old user's Hail Batch account.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "hail"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.127"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/hail-is/hail/security/advisories/GHSA-487p-qx68-5vjw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-51663"
}, {
"type" : "WEB",
"url" : "https://github.com/hail-is/hail/commit/0dcc17ff24564b6f5592261d7975e8afd0f95de7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/hail-is/hail"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/hail/PYSEC-2023-271.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-289" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-01-02T16:40:58Z",
"nvd_published_at" : "2023-12-29T17:16:07Z"
}
}