Critical Error Handling Vulnerability in Python Bottle Package

python-bottle Updated 02 Oct 2025

Summary

02/06/2022
N/A
Yes i
Critical
9.8

CVE-2022-31799: Bottle before 0.12.20 mishandles errors during early request binding. Affects python-bottle across 3 version ranges.

< 0.12.19-1+deb11u1 < a2b0ee6bb4ce88895429ec4aca856616244c4c4c < e140e1b54da721a660f2eb9d58a106b7b3ff2f00

Fixed in 0.12.19-1+deb11u1. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Python Bottle is a lightweight WSGI micro web framework for Python, designed for building small web applications quickly and easily. It is known for its simplicity and minimalism, making it a popular choice among developers. However, prior to version 0.12.20, Bottle mishandled errors during early request binding, which could lead to significant security issues.

Vulnerability Detail

The vulnerability, identified as CVE-2022-31799, arises from improper error handling in the Bottle framework during the early stages of request processing. This flaw can potentially allow attackers to exploit the application by causing unexpected behavior, leading to information disclosure or denial of service. The vulnerability has a CVSS score of 9.8, indicating a critical severity level, and affects multiple Debian versions of the Python Bottle package.

How To Fix

Minimum fixed version

0.12.19-1+deb11u1

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

If an immediate upgrade is not feasible, consider implementing input validation and error handling in your application to mitigate potential exploitation. However, this is not a substitute for upgrading the package.

Conclusion

CVE-2022-31799 represents a critical vulnerability in the Python Bottle package, affecting its error handling during request processing. Upgrading to a secure version is crucial to protect applications from potential exploitation. Utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.

See every vulnerability recorded for python-bottle →

Share this vulnerability

FAQ

CVE-2022-31799 is a vulnerability in the Python Bottle package that involves improper error handling during early request binding, potentially leading to security risks.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Simply upload your manifest file like package-lock.json to check for vulnerabilities.

The CVSS score for CVE-2022-31799 is 9.8, indicating a critical severity level.

Versions of Python Bottle before 0.12.20 are affected, specifically 0.12.19 and earlier versions.

While upgrading is the best solution, you can implement additional error handling and input validation in your application as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for python-bottle.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

0.12.19-1+deb11u1

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