oss-sec mailing list archives

CVE request: IPython CSRF validation


From: Kyle Kelley <rgbkrk () gmail com>
Date: Sun, 12 Jul 2015 15:12:33 -0500

Email addresses of requester: security () ipython org; rgbkrk () gmail com;
khanam () us ibm com
Software name: IPython notebook
Type of vulnerability: CSRF
Attack outcome: Possible remote execution
Patches:
  2.x:
https://github.com/ipython/ipython/commit/a05fe052a18810e92d9be8c1185952c13fe4e5b0
  3.x:
https://github.com/ipython/ipython/commit/1415a9710407e7c14900531813c15ba6165f0816

Affected versions: 0.12 ≤ version ≤ 3.2.0

Summary: POST requests exposed via the IPython REST API are vulnerable to
cross-site request forgery (CSRF). Web pages on different domains can make
non-AJAX POST requests to known IPython URLs, and IPython will honor them.
The user's browser will automatically send IPython cookies along with the
requests. The response is blocked by the Same-Origin Policy, but the
request isn't.

API paths with issues:

* POST /api/contents/<path>/<file>
* POST /api/contents/<path>/<file>/checkpoints
* POST /api/contents/<path>/<file>/checkpoints/<checkpoint_id>
* POST /api/kernels
* POST /api/kernels/<kernel_id>/<action>
* POST /api/sessions
* POST /api/clusters/<cluster_id>/<action>

Mitigations:

Upgrade to IPython 3.2.1. If using pip,

  pip install --upgrade ipython[notebook]

For conda:

  conda update conda
  conda update ipython ipython-notebook

Vulnerability was found by Ahmad Khan, Security Engineer at IBM.

-- 
Kyle Kelley (@rgbkrk <https://twitter.com/rgbkrk>; lambdaops.com,
developer.rackspace.com)

Current thread: