---
title: CVE-2019-9740
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2019-9740
---

# CVE-2019-9740

Publication date 12 March 2019

Last updated 25 August 2025

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

## Cvss 3 Severity Score

**6.1 · Medium**

[Score breakdown](https://ubuntu.com/security/CVE-2019-9740#impact-score)

Toggle side navigation

## Description

An issue was discovered in urllib2 in Python 2.x through 2.7.16 and urllib
in Python 3.x through 3.7.3. CRLF injection is possible if the attacker
controls a url parameter, as demonstrated by the first argument to
urllib.request.urlopen with \r\n (specifically in the query string after a
? character) followed by an HTTP header or a Redis command. This is fixed
in: v2.7.17, v2.7.17rc1, v2.7.18, v2.7.18rc1; v3.5.10, v3.5.10rc1, v3.5.8,
v3.5.8rc1, v3.5.8rc2, v3.5.9; v3.6.10, v3.6.10rc1, v3.6.11, v3.6.11rc1,
v3.6.12, v3.6.9, v3.6.9rc1; v3.7.4, v3.7.4rc1, v3.7.4rc2, v3.7.5,
v3.7.5rc1, v3.7.6, v3.7.6rc1, v3.7.7, v3.7.7rc1, v3.7.8, v3.7.8rc1, v3.7.9.

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| python2.7 | 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not affected |
| 22.04 LTS jammy | Not affected |
| 21.10 impish | Not affected |
| 21.04 hirsute | Not affected |
| 20.10 groovy | Not affected |
| 20.04 LTS focal | Not affected |
| 19.10 eoan | Not affected |
| 19.04 disco | Fixed in 2.7.16-2ubuntu0.1 |
| 18.10 cosmic | Ignored end of life |
| 18.04 LTS bionic | Fixed in 2.7.15-4ubuntu4~18.04.1 |
| 16.04 LTS xenial | Fixed in 2.7.12-1ubuntu0~16.04.8 |
| 14.04 LTS trusty | Fixed in 2.7.6-8ubuntu0.6+esm2  Ubuntu Pro |
| python3.4 | 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 21.04 hirsute | Not in release |
| 20.10 groovy | Not in release |
| 20.04 LTS focal | Not in release |
| 19.10 eoan | Not in release |
| 19.04 disco | Not in release |
| 18.10 cosmic | Not in release |
| 18.04 LTS bionic | Not in release |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Fixed in 3.4.3-1ubuntu1~14.04.7+esm2  Ubuntu Pro |
| python3.5 | 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 21.04 hirsute | Not in release |
| 20.10 groovy | Not in release |
| 20.04 LTS focal | Not in release |
| 19.10 eoan | Not in release |
| 19.04 disco | Not in release |
| 18.10 cosmic | Not in release |
| 18.04 LTS bionic | Not in release |
| 16.04 LTS xenial | Fixed in 3.5.2-2ubuntu0~16.04.8 |
| 14.04 LTS trusty | Fixed in 3.5.2-2ubuntu0~16.04.4~14.04.1+esm1  Ubuntu Pro |
| python3.6 | 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 21.04 hirsute | Not in release |
| 20.10 groovy | Not in release |
| 20.04 LTS focal | Not in release |
| 19.10 eoan | Not in release |
| 19.04 disco | Not in release |
| 18.10 cosmic | Ignored end of life |
| 18.04 LTS bionic | Fixed in 3.6.8-1~18.04.2 |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Not in release |
| python3.7 | 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 21.04 hirsute | Not in release |
| 20.10 groovy | Not in release |
| 20.04 LTS focal | Not in release |
| 19.10 eoan | Not affected |
| 19.04 disco | Fixed in 3.7.3-2ubuntu0.1 |
| 18.10 cosmic | Ignored end of life |
| 18.04 LTS bionic | Not affected |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Not in release |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)
* [Patch details](https://ubuntu.com/security/CVE-2019-9740#patch-details)

### Get expanded security coverage with Ubuntu Pro

Reduce your average CVE exposure time from 98 days to 1 day with expanded CVE patching, ten-years security maintenance and optional support for the full stack of open-source applications. Free for personal use.

[Get Ubuntu Pro](https://ubuntu.com/pro)
[30-day free trial](https://ubuntu.com/pro/free-trial)

### Patch details

For informational purposes only. We recommend not to cherry-pick updates. [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)

| Package | Patch details |
| --- | --- |
| python2.7 | * Upstream:   [bb8071a](https://github.com/python/cpython/commit/bb8071a4cae5ab3fe321481dd3d73662ffb26052) |
| python3.5 | * Upstream:   [afe3a49](https://github.com/python/cpython/commit/afe3a4975cf93c97e5d6eb8800e48f368011d37a) |
| python3.6 | * Upstream:   [c50d437](https://github.com/python/cpython/commit/c50d437e942d4c4c45c8cd76329b05340c02eb31) |
| python3.7 | * Upstream:   [7e200e0](https://github.com/python/cpython/commit/7e200e0763f5b71c199aaf98bd5588f291585619) |

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

6.1 · Medium

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Network |
  | Attack complexity | Low |
  | Privileges required | None |
  | User interaction | Required |
  | Scope | Changed |
  | Confidentiality impact | Low |
  | Integrity impact | Low |
  | Availability impact | None |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 6.1 · Medium |
  | Exploitability score | - |
  | Impact score | - |

**Vector:** CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-9740)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2019-9740)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2019-9740)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2019-9740)

### Related Ubuntu Security Notices (USN)

+ [USN-4127-1](https://usn.ubuntu.com/USN-4127-1)
+ Python vulnerabilities
+ 9 September 2019

+ [USN-4127-2](https://usn.ubuntu.com/USN-4127-2)
+ Python vulnerabilities
+ 10 September 2019

+ [USN-6891-1](https://usn.ubuntu.com/USN-6891-1)
+ Python vulnerabilities
+ 11 July 2024

### Other references

* <https://python-security.readthedocs.io/vuln/http-header-injection2.html>
* <https://www.cve.org/CVERecord?id=CVE-2019-9740>
