# CVE-2020-36191: Cross-Site Request Forgery in JupyterHub

> Attackers can perform unauthorized admin actions like adding or removing users in JupyterHub due to missing CSRF protection.

- **Severity:** Medium 4.5 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 13 Jan 2021
- **Updated:** 4 Aug 2024
- **Also known as:** BIT-jupyterhub-2020-36191, DEBIAN-CVE-2020-36191, GHSA-7xx3-qp5w-fw96, PYSEC-2021-67, UBUNTU-CVE-2020-36191

## What is CVE-2020-36191?

CVE-2020-36191 is a medium-severity vulnerability in n/a, published on 13 Jan 2021. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

JupyterHub 1.1.0 allows CSRF in the admin panel via a request that lacks an _xsrf field, as demonstrated by a /hub/api/user request (to add or remove a user account).

Weakness: CWE-352 (Cross-Site Request Forgery)

## Which versions are affected by CVE-2020-36191?

4 open source packages ship an affected version, including jupyterhub. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `jupyterhub` | Bitnami | From 1.1.0 | 1.1.1 |
| `jupyterhub` | PyPI | All versions | 1.2.0b1 |
| `jupyterhub` | PyPI | All versions | 1.2.0b1 |
| `jupyterhub` | PyPI | All versions | 1.2.0b1 |

Products: Jupyter Jupyterhub.

## How do I fix CVE-2020-36191?

Upgrade jupyterhub to a fixed version for your release line: 1.1.1 or 1.2.0b1.

## Is CVE-2020-36191 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2024-28233](https://insights.sbomify.com/CVE-2024-28233/): XSS in JupyterHub via Self-XSS leveraged by Cookie Tossing (high 8.1)
- [CVE-2024-41942](https://insights.sbomify.com/CVE-2024-41942/): JupyterHub has a privilege escalation vulnerability with the `admin:users` scope (high 7.2)
- [CVE-2019-10255](https://insights.sbomify.com/CVE-2019-10255/): Open Redirect vulnerability in jupyterhub and notebook (medium 6.1)
- [CVE-2026-40864](https://insights.sbomify.com/CVE-2026-40864/): JupyterHub: Cross-origin form POSTs bypass XSRF (medium 5.4)
- [CVE-2026-33709](https://insights.sbomify.com/CVE-2026-33709/): JupyterHub has an Open Redirect Vulnerability (medium 5.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-36191 and fix it if it is affected.

What it is: CVE-2020-36191 is a medium-severity vulnerability in n/a, published on 13 Jan 2021. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2020-36191 in the wild and no public exploit code.

Affected packages and fixed versions:
- jupyterhub (Bitnami): affected from 1.1.0; fixed in 1.1.1
- jupyterhub (PyPI): affected all versions; fixed in 1.2.0b1
- jupyterhub (PyPI): affected all versions; fixed in 1.2.0b1
- jupyterhub (PyPI): affected all versions; fixed in 1.2.0b1

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

## Sources

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

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