# CVE-2019-12855: Improper Certificate Validation in Twisted

> Attackers can perform man-in-the-middle attacks on XMPP connections because the Twisted library fails to verify TLS certificates.

- **Severity:** High 7.4 (`CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Jun 2019
- **Updated:** 4 Aug 2024
- **Also known as:** AZL-6818, DEBIAN-CVE-2019-12855, GHSA-65rm-h285-5cc5, PYSEC-2019-129, SUSE-SU-2019:2212-1, SUSE-SU-2019:2453-1, UBUNTU-CVE-2019-12855, openSUSE-SU-2019:2068-1, openSUSE-SU-2019:2110-1

## What is CVE-2019-12855?

CVE-2019-12855 is a high-severity vulnerability in n/a, published on 16 Jun 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

In words.protocols.jabber.xmlstream in Twisted through 19.2.1, XMPP support did not verify certificates when used with TLS, allowing an attacker to MITM connections.

Weakness: CWE-295 (Improper Certificate Validation)

## Which versions are affected by CVE-2019-12855?

3 open source packages ship an affected version, including twisted and Twisted. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `twisted` | PyPI | All versions | 19.7.0rc1 |
| `twisted` | PyPI | All versions | 19.7.0rc1 |
| `Twisted` | PyPI | All versions | 19.7.0rc1 |
| `python-Twisted` | SUSE:Enterprise Storage 4 | All versions | 15.2.1-9.8.1 |
| `python-Twisted` | SUSE:Enterprise Storage 5 | All versions | 15.2.1-9.8.1 |
| `python-Twisted` | SUSE:HPE Helion OpenStack 8 | All versions | 15.2.1-9.8.1 |
| `python-Twisted` | SUSE:Linux Enterprise Module for Web and Scripting 12 | All versions | 15.2.1-9.8.1 |
| `python-Twisted` | SUSE:OpenStack Cloud 7 | All versions | 15.2.1-9.8.1 |
| `python-Twisted` | SUSE:OpenStack Cloud 8 | All versions | 15.2.1-9.8.1 |
| `python-Twisted` | SUSE:OpenStack Cloud 9 | All versions | 15.2.1-9.8.1 |
| `python-Twisted` | SUSE:OpenStack Cloud Crowbar 8 | All versions | 15.2.1-9.8.1 |
| `python-Twisted` | SUSE:OpenStack Cloud Crowbar 9 | All versions | 15.2.1-9.8.1 |
| `python-Twisted` | SUSE:Package Hub 15 | All versions | 17.9.0-bp150.4.6.1 |
| `python-Twisted` | openSUSE:Leap 15.0 | All versions | 17.9.0-lp151.3.6.1 |
| `python-Twisted` | openSUSE:Leap 15.1 | All versions | 17.9.0-lp151.3.6.1 |

Products: Twisted Twisted.

## How do I fix CVE-2019-12855?

Upgrade twisted to 19.7.0rc1 or later.

## Is CVE-2019-12855 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2026-42304](https://insights.sbomify.com/CVE-2026-42304/): Twisted: Denial of Service (DoS) in twisted.names via Crafted DNS Compression Pointer Chains (high 7.5)
- [CVE-2014-7143](https://insights.sbomify.com/CVE-2014-7143/): Python Twisted trustRoot is not respected in HTTP client (high 7.5)
- [CVE-2024-41810](https://insights.sbomify.com/CVE-2024-41810/): HTML injection in HTTP redirect body (medium 6.1)
- [CVE-2023-46137](https://insights.sbomify.com/CVE-2023-46137/): twisted.web has disordered HTTP pipeline response (medium 5.3)
- [CVE-2016-1000111](https://insights.sbomify.com/CVE-2016-1000111/): Forced Browsing in Twisted (medium 5.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-12855 and fix it if it is affected.

What it is: CVE-2019-12855 is a high-severity vulnerability in n/a, published on 16 Jun 2019. 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-2019-12855 in the wild and no public exploit code.

Affected packages and fixed versions:
- twisted (PyPI): affected all versions; fixed in 19.7.0rc1
- twisted (PyPI): affected all versions; fixed in 19.7.0rc1
- Twisted (PyPI): affected all versions; fixed in 19.7.0rc1

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-2019-12855/ (Markdown: https://insights.sbomify.com/CVE-2019-12855/index.md)
```

## Sources

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

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