# CVE-2022-31799: PYSEC-2022-227 - Bottle before 0.12.20 mishandles errors during early request binding.

Source: https://junglewise.ai/threats/cve-2022-31799-denial-of-service-in-bottle  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-06-02  
License: CC BY 4.0 with a link back

CVE-2022-31799 · Severity: low · CVSS 3.1 · Published 2022-06-02

Bottle before 0.12.20 mishandles errors during early request binding.

Technologies: [bottle (PyPI)](https://junglewise.ai/threats/technologies/bottle). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2022-31799 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-31799 being exploited in the wild.

**How severe is CVE-2022-31799?** Low severity, with a CVSS score of 3.1, published 2 June 2022.

**Which products and versions are affected?** bottle (PyPI) ECOSYSTEM:introduced=0,fixed=0.12.20, GIT:introduced=0,fixed=e140e1b54da721a660f2eb9d58a106b7b3ff2f00,fixed=a2b0ee6bb4ce88895429ec4aca856616244c4c4c|ECOSYSTEM:introduced=0,fixed=0.12.20.

**Is there a fix for CVE-2022-31799?** Yes. bottle (PyPI): upgrade to 0.12.20 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2022-31799?** Check whether you run bottle (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- bottle (PyPI): upgrade to 0.12.20 or later

  ```sh
  pip install "bottle>=0.12.20"
  ```


## Affected products

- bottle (PyPI) ECOSYSTEM:introduced=0,fixed=0.12.20, GIT:introduced=0,fixed=e140e1b54da721a660f2eb9d58a106b7b3ff2f00,fixed=a2b0ee6bb4ce88895429ec4aca856616244c4c4c|ECOSYSTEM:introduced=0,fixed=0.12.20

## Identifiers

- CVE-2022-31799
- GHSA-xhp9-4947-rq78
- PYSEC-2022-227

## Related threats

- [bottle HTTP Request smuggling](https://junglewise.ai/threats/cve-2020-28473-bottle-http-request-smuggling)
- [bottle.py vulnerable to CRLF Injection](https://junglewise.ai/threats/cve-2016-9964-bottle-py-vulnerable-to-crlf-injection)
- [Bottle does not properly limit content-types](https://junglewise.ai/threats/cve-2014-3137-bottle-does-not-properly-limit-content-types)
