GHSL-2020-096: Missing hostname validation in tweetstream - CVE-2020-24393
The tweetstream library uses eventmachine in a way that does not validate the hostname in the server's TLS certificate. An attacker who can intercept network traffic could impersonate the Twitter streaming server and feed malicious data to the client.
Originally disclosed on GitHub Security Lab
Missing hostname validation allows an attacker to perform a monster in the middle attack against users of the library.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could assume the identity of a trusted server and introduce malicious data in an otherwise trusted place.
What the attacker needed
Attacker can intercept network traffic; victim uses tweetstream library
How it was found
- Add a fake DNS entry mapping the streaming hostname to localhost.
- Create a self-signed certificate.
- Start a TLS server on port 443 using that certificate.
- Configure and run a tweetstream client that connects to the streaming endpoint.
- Observe the client connecting to the fake server without rejecting the certificate.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When your program connects to a secure website, it checks a digital certificate to make sure it is talking to the real server. This library skipped checking that the certificate actually belongs to the server's name, so someone who can intercept the connection could pretend to be the server and send fake data.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.