CVE-2015-4707: Improper Neutralization of Input During Web Page Generation in IPython
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.73259%
CWE
Published
5/13/2022
Updated
9/23/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
ipython | pip | >= 0, < 3.2.0 | 3.2.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from error responses (including user-controllable input) being served with text/html Content-Type. The critical fixes in the commit 7222bd5: (1) introduced APIHandler to enforce 'application/json' headers, and (2) modified the json_errors decorator to explicitly set this header during exception handling. Functions like write_error and API endpoint handlers (e.g., ApiVersionHandler.get) relied on these mechanisms. Prior to the patch, missing headers allowed XSS when error messages containing attacker-controlled data were reflected without proper escaping or content type restrictions.