# CVE-2014-3137: Bottle does not properly limit content-types

> Remote attackers can bypass content-type restrictions in the Bottle web framework to execute arbitrary code.

- **Severity:** Medium 6.8 (`AV:N/AC:M/Au:N/C:P/I:P/A:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 Oct 2014
- **Updated:** 6 Aug 2024
- **Also known as:** DEBIAN-CVE-2014-3137, DSA-2948-1, GHSA-873q-wpqr-xfgw, PYSEC-2014-77, UBUNTU-CVE-2014-3137

## What is CVE-2014-3137?

CVE-2014-3137 is a medium-severity vulnerability in n/a, published on 25 Oct 2014. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Bottle 0.10.x before 0.10.12, 0.11.x before 0.11.7, and 0.12.x before 0.12.6 does not properly limit content types, which allows remote attackers to bypass intended access restrictions via an accepted Content-Type followed by a ; (semi-colon) and a Content-Type that would not be accepted, as demonstrated in YouCompleteMe to execute arbitrary code.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2014-3137?

7 open source packages ship an affected version, including bottle. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bottle` | PyPI | From 0.10.0 | 0.10.12 |
| `bottle` | PyPI | From 0.10.0 | 0.10.12 |
| `bottle` | PyPI | From 0.11.0 | 0.11.7 |
| `bottle` | PyPI | From 0.11.0 | 0.11.7 |
| `bottle` | PyPI | From 0.12.0 | 0.12.6 |
| `bottle` | PyPI | From 0.12.0 | 0.12.6 |
| `bottle` | PyPI | From 0.8 | 0.10.12, 0.11.7, 0.12.6 |

Products: Bottlepy Bottle.

## How do I fix CVE-2014-3137?

Upgrade bottle to a fixed version for your release line: 0.10.12, 0.11.7 or 0.12.6.

## Is CVE-2014-3137 being exploited?

There is no known exploitation of CVE-2014-3137 in the wild and no public exploit code.

## Other vulnerabilities in n/a

- [CVE-2022-31799](https://insights.sbomify.com/CVE-2022-31799/): Denial of service in bottle (critical 9.8)
- [CVE-2020-28473](https://insights.sbomify.com/CVE-2020-28473/): Web Cache Poisoning (medium 6.8)
- [CVE-2016-9964](https://insights.sbomify.com/CVE-2016-9964/): bottle.py vulnerable to CRLF Injection (medium 6.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2014-3137 and fix it if it is affected.

What it is: CVE-2014-3137 is a medium-severity vulnerability in n/a, published on 25 Oct 2014. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2014-3137 in the wild and no public exploit code.

Affected packages and fixed versions:
- bottle (PyPI): affected from 0.10.0; fixed in 0.10.12
- bottle (PyPI): affected from 0.10.0; fixed in 0.10.12
- bottle (PyPI): affected from 0.11.0; fixed in 0.11.7
- bottle (PyPI): affected from 0.11.0; fixed in 0.11.7
- bottle (PyPI): affected from 0.12.0; fixed in 0.12.6
- bottle (PyPI): affected from 0.12.0; fixed in 0.12.6
- bottle (PyPI): affected from 0.8; fixed in 0.10.12, 0.11.7, 0.12.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2014-3137/ (Markdown: https://insights.sbomify.com/CVE-2014-3137/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2014-3137
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2014-3137
- OSV: https://osv.dev/vulnerability/CVE-2014-3137

---
From sbomify Insights: https://insights.sbomify.com/CVE-2014-3137/
Summaries are generated and may contain mistakes; the official description above is the record.
