# CVE-2022-31027: Authorization Bypass Through User-Controlled Key when using CILogonOAuthenticator in oauthenticator

- Severity: Medium 4.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.47%, higher than 42% of CVEs (2026-12-01)
- Published: 2022-06-06T21:15:12.000Z
- Modified: 2026-06-17T04:44:38.147Z
- Also known as: GHSA-r7v4-jwx9-wx43, PYSEC-2022-206
- Weaknesses: CWE-639
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

OAuthenticator is an OAuth token library for the JupyerHub login handler. CILogonOAuthenticator is provided by the OAuthenticator package, and lets users log in to a JupyterHub via CILogon. This is primarily used to restrict a JupyterHub only to users of a given institute. The allowed_idps configuration trait of CILogonOAuthenticator is documented to be a list of domains that indicate the institutions whose users are authorized to access this JupyterHub. This authorization is validated by ensuring that the *email* field provided to us by CILogon has a *domain* that matches one of the domains listed in `allowed_idps`.If `allowed_idps` contains `berkeley.edu`, you might expect only users with valid current credentials provided by University of California, Berkeley to be able to access the JupyterHub. However, CILogonOAuthenticator does *not* verify which provider is used by the user to login, only the email address provided. So a user can login with a GitHub account that has email set to `<something>@berkeley.edu`, and that will be treated exactly the same as someone logging in using the UC Berkeley official Identity Provider. The patch fixing this issue makes a *breaking change* in how `allowed_idps` is interpreted. It's no longer a list of domains, but configuration representing the `EntityID` of the IdPs that are allowed, picked from the [list maintained by CILogon](https://cilogon.org/idplist/). Users are advised to upgrade.

(As written by CVE List.)

## Affected

- jupyterhub oauthenticator: < 15.0.0
- oauthenticator (PyPI): before 15.0.0
- jupyter oauthenticator: before 15.0.0

## Every score

- GitHub_M: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N`
- GitHub: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:2.0 4.0 Medium `AV:N/AC:L/Au:S/C:P/I:N/A:N`

## References

- <https://github.com/jupyterhub/oauthenticator/security/advisories/GHSA-r7v4-jwx9-wx43> (advisory, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31027> (advisory)
- <https://github.com/jupyterhub/oauthenticator/commit/5cd2d1816f90dc5c946e6e38fd2d0ba535624c5c> (web)
- <https://github.com/jupyterhub/oauthenticator> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/oauthenticator/PYSEC-2022-206.yaml> (web)

## Sources

- CVE List: [CVE-2022-31027](https://www.cve.org/CVERecord?id=CVE-2022-31027), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-r7v4-jwx9-wx43](https://github.com/advisories/GHSA-r7v4-jwx9-wx43), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2022-31027](https://nvd.nist.gov/vuln/detail/CVE-2022-31027), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-206](https://osv.dev/vulnerability/PYSEC-2022-206), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2022-31027 · Whole record: https://cve.day/CVE-2022-31027.json · Rebuilt by cve.day 2026-11-25T22:58:12.185Z
