CRLF Injection Vulnerability in Python 3.x Packages

python3.4 Updated 04 Oct 2025

Summary

27/09/2020
N/A
Yes i
High
7.2

UBUNTU-CVE-2020-26116: http.client in Python 3.x before 3.5.10, 3.6.x before 3.6.12, 3.7.x before 3.7.9, and 3.8.x before 3.8.5 allows CRLF injection if the attacker controls the HTTP request method, as demonstrated by inserting CR and LF cont... Affects python3.4 versions < 3.4.3-1ubuntu1~14.04.7+esm8. Fixed in 3.4.3-1ubuntu1~14.04.7+esm8. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Python is a widely-used high-level programming language known for its readability and versatility. The affected packages, including python3.4, python3.5, python3.6, python3.7, and python3.8, are essential components for running Python applications. These packages provide the Python interpreter and standard libraries, enabling developers to create a wide range of applications. The vulnerability in question affects the http.client module, which is responsible for handling HTTP requests, making it critical for web-based applications.

Vulnerability Detail

The vulnerability, identified as CVE-2020-26116, allows for CRLF (Carriage Return Line Feed) injection in Python 3.x versions prior to 3.5.10, 3.6.x before 3.6.12, 3.7.x before 3.7.9, and 3.8.x before 3.8.5. This issue arises when an attacker can control the HTTP request method, enabling them to insert CR and LF control characters in the first argument of the HTTPConnection.request method. This could lead to various attacks, including HTTP response splitting, which can compromise the integrity and confidentiality of the application.

How To Fix

Minimum fixed version

3.4.3-1ubuntu1~14.04.7+esm8

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python3.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, ensure that user input is sanitized and validated before being passed to the HTTPConnection.request method. This can help mitigate the risk of CRLF injection. Additionally, consider using a more secure method for handling HTTP requests, such as using higher-level libraries that abstract away direct HTTP handling.

Conclusion

The CRLF injection vulnerability in Python 3.x packages poses a significant risk to applications that rely on these versions. It is crucial to update to the patched versions to safeguard against potential attacks. Additionally, implementing input validation can serve as a temporary measure until updates can be applied.

See every vulnerability recorded for python3.4 →

Share this vulnerability

FAQ

CRLF injection is a type of attack that allows an attacker to insert Carriage Return (CR) and Line Feed (LF) characters into HTTP headers, potentially leading to HTTP response splitting and other security issues.

The affected versions include Python 3.x before 3.5.10, 3.6.x before 3.6.12, 3.7.x before 3.7.9, and 3.8.x before 3.8.5.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application against this vulnerability using the Vulert playground without any signup.

If exploited, this vulnerability can lead to HTTP response splitting, allowing attackers to manipulate responses, steal sensitive information, or perform further attacks on users.

Yes, you can sanitize and validate user inputs before passing them to HTTP requests to reduce the risk of CRLF injection.

Related vulnerabilities

Recent vulnerabilities recorded for python3.4.

How To Fix

Minimum fixed version

3.4.3-1ubuntu1~14.04.7+esm8

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python3.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback