Loading...
Skip to main content

CVE-2020-15133 — Missing TLS certificate verification in...

HIGH

Missing TLS certificate verification in faye-websocket

Published July 31, 2020Updated September 10, 2026Source: osv

Summary

The `Faye::WebSocket::Client` class uses the [`EM::Connection#start_tls`][1] method in [EventMachine][2] to implement the TLS handshake whenever a `wss:` URL is used for the connection. This method does not implement certificate verification by default, meaning that it does not check that the server presents a valid and trusted TLS certificate for the expected hostname. That means that any `wss:` connection made using this library is vulnerable to a man-in-the-middle attack, since it does not confirm the identity of the server it is connected to. This has been a requested feature in EventMachine for many years now; see for example [#275][3], [#378][4], and [#814][5]. In June 2020, [em-http-request][6] published an [advisory][7] related to this problem and fixed it by [implementing TLS verification][8] in their own codebase; although EventMachine does not implement certificate verification itself, it provides an extension point for the caller to implement it, called [`ssl_verify_peer`][9]. Based on this implementation, we have incorporated similar functionality into [faye-websocket for Ruby][10], such that we use the `OpenSSL` module to perform two checks: - The chain of certificates presented by the server is valid and ultimately trusted by your root certificate set -- either your system default root certificates, or a set provided at runtime - The final certificate presented by the server is valid for the hostname used in the request URI; if the connection is made via a proxy we use the hostname from the request, not the proxy's hostname After implementing verification in v1.1.6, em-http-request has elected to leave the `:verify_peer` option switched off by default. We have decided to _enable_ this option by default in faye-websocket, but are publishing a minor release with added functionality for configuring it. We are mindful of the fact that this may break existing programs, but we consider it much more important that all clients have TLS verification turned on by default. A client that is not carrying out verification is either: - talking to the expected server, and will not break under this change - being attacked, and would benefit from being alerted to this fact - deliberately talking to a server that would be rejected by verification The latter case includes situations like talking to a non-public server using a self-signed certificate. We consider this use case to be "working by accident", rather than functionality that was actively supported, and it should be properly and explicitly supported instead. To that end, we have added two new options to the `Faye::WebSocket::Client` constructor: `tls.root_cert_file`, and `tls.verify_peer`. The `:root_cert_file` option lets you provide a different set of root certificates in situations where you don't want to use your system's default root certificates to verify the remote host. It should be a path or an array of paths identifying the certificates to use instead of the defaults. ```rb client = Faye::WebSocket::Client.new('wss://example.com/', [], tls: { root_cert_file: 'path/to/certificate.pem' }) ``` The `:verify_peer` option lets you turn verification off entirely. This should be a last resort and we recommend using the `:root_cert_file` option if possible. ```rb client = Faye::WebSocket::Client.new('wss://example.com/', [], tls: { verify_peer: false }) ``` To get the new behaviour, please upgrade to v0.11.0 of the [Rubygems package][10]. There are, unfortunately, no workarounds for this issue, as you cannot enable `:verify_peer` in EventMachine unless the calling library contains an implementation of `ssl_verify_peer` that actually checks the server's certificates. For further background information on this issue, please see [faye#524][12] and [faye-websocket#129][13]. We would like to thank [Tero Marttila][14] and [Daniel Morsing][15] for providing invaluable assistance and feedback on this issue. [1]: https://www.rubydoc.info/github/eventmachine/eventmachine/EventMachine/Connection:start_tls [2]: https://rubygems.org/gems/eventmachine [3]: https://github.com/eventmachine/eventmachine/issues/275 [4]: https://github.com/eventmachine/eventmachine/pull/378 [5]: https://github.com/eventmachine/eventmachine/issues/814 [6]: https://rubygems.org/gems/em-http-request [7]: https://securitylab.github.com/advisories/GHSL-2020-094-igrigorik-em-http-request [8]: https://github.com/igrigorik/em-http-request/pull/340 [9]: https://www.rubydoc.info/github/eventmachine/eventmachine/EventMachine/Connection:ssl_verify_peer [10]: https://rubygems.org/gems/faye-websocket [12]: https://github.com/faye/faye/issues/524 [13]: https://github.com/faye/faye-websocket-ruby/pull/129 [14]: https://github.com/SpComb [15]: https://github.com/DanielMorsing

Advisory Timeline

  • First published July 31, 2020 (2264 days ago).
  • Last revised September 10, 2026 — 2231 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update faye-websocket to 0.11.0 or later
gem install faye-websocket -v 0.11.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
faye-websocket
rubygems
0.1.0, 0.1.1, 0.1.2, 0.10.0 (+34 more)0.11.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-295
    Improper Certificate ValidationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N

Frequently Asked Questions

What is CVE-2020-15133?
Missing TLS certificate verification in faye-websocket This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.0/10).
How do I check if my project is affected by CVE-2020-15133?
CVE-2020-15133 affects faye-websocket. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2020-15133 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.0

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-2v5c-755p-p4gv

Related CVEs

  • CVE-2026-94462
    HIGH

    Spree: Broken Access Control in `PATCH /api/v3/store/carts/:id/associate` (IDOR)

  • CVE-2026-77601
    HIGH

    OpenC3 COSMOS: Authenticated OS command injection via the `pypi_url` setting

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies