# CVE-2018-17187: Improper Certificate Validation in proton-j

> Attackers can perform Man-in-the-Middle attacks against Apache Qpid Proton-J clients using TLS if hostname verification was intended but not implemented.

- **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:** 13 Nov 2018
- **Updated:** 5 Aug 2024
- **Also known as:** DEBIAN-CVE-2018-17187, GHSA-xvch-r4wf-h8w9, UBUNTU-CVE-2018-17187

## What is CVE-2018-17187?

CVE-2018-17187 is a high-severity vulnerability in Apache Qpid Proton-J, published on 13 Nov 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The Apache Qpid Proton-J transport includes an optional wrapper layer to perform TLS, enabled by use of the 'transport.ssl(...)' methods. Unless a verification mode was explicitly configured, client and server modes previously defaulted as documented to not verifying a peer certificate, with options to configure this explicitly or select a certificate verification mode with or without hostname verification being performed. The latter hostname verifying mode was not implemented in Apache Qpid Proton-J versions 0.3 to 0.29.0, with attempts to use it resulting in an exception. This left only the option to verify the certificate is trusted, leaving such a client vulnerable to Man In The Middle (MITM) attack. Uses of the Proton-J protocol engine which do not utilise the optional transport TLS wrapper are not impacted, e.g. usage within Qpid JMS. Uses of Proton-J utilising the optional transport TLS wrapper layer that wish to enable hostname verification must be upgraded to version 0.30.0 or later and utilise the VerifyMode#VERIFY_PEER_NAME configuration, which is now the default for client mode usage unless configured otherwise.

Weakness: CWE-295 (Improper Certificate Validation)

## Which versions are affected by CVE-2018-17187?

2 open source packages ship an affected version, including org.apache.qpid:proton-j. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.qpid:proton-j` | Maven | From 0.3 | 0.30.0 |
| `org.apache.qpid:proton-j` | Maven | From 0.3 | 0.30.0 |

Products: Apache Qpid Proton-J.

## How do I fix CVE-2018-17187?

Upgrade org.apache.qpid:proton-j to 0.30.0 or later.

## Is CVE-2018-17187 being exploited?

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

## Other vulnerabilities in Apache Qpid Proton-J

- [CVE-2026-66257](https://insights.sbomify.com/CVE-2026-66257/): Apache Qpid Proton-J: Unbounded symbol value caching can lead to pre-authentication resource exhaustion (high 7.5)
- [CVE-2026-66273](https://insights.sbomify.com/CVE-2026-66273/): Apache Qpid Proton-J: Type size/count handling can lead to excessive allocation pre-authentication (high 7.5)
- [CVE-2026-66274](https://insights.sbomify.com/CVE-2026-66274/): Apache Qpid Proton-J: Unbounded type nesting can lead to pre-authentication stackoverflow (high 7.5)
- [CVE-2026-66275](https://insights.sbomify.com/CVE-2026-66275/): Apache Qpid Proton-J: Incoming session flow control window can be exceeded (medium 6.5)
- [CVE-2026-66276](https://insights.sbomify.com/CVE-2026-66276/): Apache Qpid Proton-J: Unbounded disposition range handling can lead to denial of service (medium 6.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-17187 and fix it if it is affected.

What it is: CVE-2018-17187 is a high-severity vulnerability in Apache Qpid Proton-J, published on 13 Nov 2018. 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-2018-17187 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.qpid:proton-j (Maven): affected from 0.3; fixed in 0.30.0
- org.apache.qpid:proton-j (Maven): affected from 0.3; fixed in 0.30.0

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

## Sources

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

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