Vulnerabilities in pkg:pypi/bottle

PACKAGE
Advisory Identifier: GHSA-j6f7-hghw-g437
Advisory Summary

CVE-2016-9964 is a HIGH (CVSS 6.5) bottle.py vulnerable to crlf injection vulnerability (CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')) affecting Bottle libraries in the PyPI ecosystem. The issue involves bottle.py vulnerable to crlf injection. Remediation is available by upgrading affected packages to version 0.12.11.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/bottle

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/bottle. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-j6f7-hghw-g437 CVE-2016-9964 HIGH bottle.py vulnerable to CRLF Injection
GHSA-873q-wpqr-xfgw CVE-2014-3137 HIGH Bottle does not properly limit content-types
GHSA-xhp9-4947-rq78 CVE-2022-31799 CRITICAL Denial of service in bottle
GHSA-qhx9-7hx7-cp4r CVE-2020-28473 MODERATE bottle HTTP Request smuggling

CVE-2016-9964 at a Glance

CVE Identifier CVE-2016-9964
GHSA Identifier GHSA-j6f7-hghw-g437
Severity HIGH
CVSS v3.1 Base Score 6.5
CWE Classification CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')
Affected Product Bottle
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2016-9964

To remediate this vulnerability, upgrade all affected Bottle dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

bottle fixed: 0.12.11
pip install bottle>=0.12.11
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show bottle

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2016-9964, inspect your installed packages using pip:

pip show bottle

Analyze the terminal output to locate any version of Bottle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.11), your application is affected.

Note: The pip show bottle command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection'), where the product uses crlf (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes crlf sequences from inputs. In Bottle, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

bottle.py is a fast and simple micro-framework for python web-applications. 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.

CVE-2016-9964 Affected Bottle Versions

1 component(s)
Fixed Versions:
0.12.11
Product / Package Ecosystem Affected Versions Fixed Version
bottle
PyPI
≥ 0.10.1
< 0.12.11
0.12.11

References

Frequently Asked Questions

What is CVE-2016-9964?
CVE-2016-9964 is a security vulnerability in Bottle involving bottle.py vulnerable to CRLF Injection under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection').
Which Bottle versions are affected?
Affected versions include releases prior to 0.12.11 across affected packages: bottle.
What version fixes CVE-2016-9964?
Upgrading to 0.12.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bottle affected?
Yes, bottle is affected in releases prior to 0.12.11. Upgrade your dependency to 0.12.11 or later.
What is the CVSS score of CVE-2016-9964?
CVE-2016-9964 has a CVSS v3.1 base score of 6.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2016-9964?
CVE-2016-9964 is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') (The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.).
How can I check PyPI dependencies for CVE-2016-9964?
Run the dependency tree command: 'pip show bottle'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j6f7-hghw-g437",
  "modified" : "2024-11-18T16:26:23Z",
  "published" : "2022-05-17T03:05:15Z",
  "aliases" : [ "CVE-2016-9964" ],
  "summary" : "bottle.py vulnerable to CRLF Injection",
  "details" : "bottle.py is a fast and simple micro-framework for python web-applications. 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "bottle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.10.1"
      }, {
        "fixed" : "0.12.11"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-9964"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bottlepy/bottle/issues/913"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bottlepy/bottle/commit/6d7e13da0f998820800ecb3fe9ccee4189aefb54"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bottlepy/bottle/commit/78f67d51965db11cb1ed0003f1eb7926458b5c2c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-j6f7-hghw-g437"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bottlepy/bottle"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/bottle/PYSEC-2016-24.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20170214030628/http://www.securityfocus.com/bid/94961"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2016/dsa-3743"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-93" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-05-31T15:43:48Z",
    "nvd_published_at" : "2016-12-16T09:59:00Z"
  }
}