CRLF Injection Vulnerability in Python Bottle Package - CVE-2016-9964

python-bottle Updated 03 Oct 2025

Summary

16/12/2016
N/A
Yes i
Medium
6.5

UBUNTU-CVE-2016-9964: redirect() in bottle.py in bottle 0.12.10 doesn't filter a "\r\n" sequence, which leads to a CRLF attack, as demonstrated by a redirect("233\r\nSet-Cookie: name=salt") call. Affects python-bottle versions < 0.12.0-1ubuntu0.1~esm1. Fixed in 0.12.0-1ubuntu0.1~esm1. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Python Bottle package is a lightweight WSGI micro web framework for Python, designed for building small web applications quickly and efficiently. It is known for its simplicity and ease of use, making it a popular choice among developers. However, the package has been found to be vulnerable to a CRLF injection attack, which can compromise the security of applications built using this framework.

Vulnerability Detail

The vulnerability identified as CVE-2016-9964 arises from the redirect() function in bottle.py, specifically in version 0.12.10. This function fails to properly filter a '\r\n' sequence, allowing attackers to perform a CRLF (Carriage Return Line Feed) injection. This can lead to various security issues, including HTTP response splitting, which may enable attackers to set cookies or manipulate headers, potentially compromising user sessions and data integrity.

How To Fix

Minimum fixed version

0.12.0-1ubuntu0.1~esm1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-bottle

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

Workaround

As a temporary workaround, developers can implement input validation to sanitize user inputs that are passed to the redirect() function, ensuring that no CRLF sequences are included. This can be done by replacing or removing any instances of '\r' and '\n' from the input before processing it.

Conclusion

The CVE-2016-9964 vulnerability in the Python Bottle package poses a significant risk due to its potential for CRLF injection attacks. It is crucial for developers to update their packages to the latest patched versions and implement necessary input validation to safeguard their applications.

See every vulnerability recorded for python-bottle →

Share this vulnerability

FAQ

CVE-2016-9964 is a vulnerability in the Python Bottle package that allows for CRLF injection attacks due to improper filtering in the redirect() function.

Exploiting this vulnerability can lead to HTTP response splitting, allowing attackers to manipulate headers and potentially hijack user sessions.

Yes, patched versions of the Python Bottle package are available. Users should update to version 0.12.0-1ubuntu0.1~esm1 or 0.12.7-1+deb8u1build0.16.04.1 depending on their Ubuntu version.

If an immediate update is not possible, implement input validation to sanitize any user inputs that may be passed to the redirect() function.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Check your application using the Vulert playground at Vulert Scanner.

Related vulnerabilities

Recent vulnerabilities recorded for python-bottle.

How To Fix

Minimum fixed version

0.12.0-1ubuntu0.1~esm1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-bottle

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