Skip to content
Crypto Advisory Intermediate CVE-2020-13163

GHSL-2020-095 : Monster in the middle attack in em-imap - CVE-2020-13163

The em-imap library did not validate the hostname in SSL/TLS certificates when connecting to IMAP servers. An attacker could impersonate a trusted server and inject malicious data into the connection.

agustingianni Follow

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.

agustingianni, on GitHub Security Lab

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 on the network path; victim uses em-imap to connect

The fix

Hostname validation should be implemented.

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 app connects to a server over SSL/TLS, it should check that the certificate belongs to the server's hostname. This library skipped that check, so an attacker on the network could pretend to be the real server and intercept or alter the data.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More by agustingianni

View all

24 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.