Skip to content
Info disclosure Advisory Advanced CVE-2019-5065

Blynk inc. Blynk-Library BlynkProtocol<Transp>::processInput() information disclosure vulnerability

An information disclosure vulnerability exists in Blynk-Library v0.6.1 due to an unterminated strncpy when handling a redirect packet. An attacker can send a specially crafted packet to potentially leak heap memory contents via a DNS lookup.

Lilith Wyatt Follow

Originally disclosed on Cisco Talos

Medium 5.3 View original

An exploitable information disclosure vulnerability exists in the packet-parsing functionality of Blynk-Library v0.6.1. A specially crafted packet can cause an unterminated strncpy, resulting in information disclosure.

Lilith ( ̄■ ̄;) Wyatt, on Cisco Talos

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

Root cause

The code uses strncpy to copy up to 32 bytes into a 32-byte buffer without ensuring null termination, leading to an out-of-bounds read when the string is later used.

Impact

An attacker could potentially leak heap memory contents through a DNS lookup, but this only works with certain malloc implementations like jemalloc and not with common ones like ptmalloc/dlmalloc.

What the attacker needed

Attacker can send packets to device; device uses jemalloc or similar malloc

How it was found

  1. Send a BLYNK_CMD_REDIRECT packet with a server name of 32 bytes or more.
  2. The library copies the name into a 32-byte buffer without null termination.
  3. The device attempts to connect to the server, triggering a DNS lookup that reads past the buffer.

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.

This report describes a bug in a library used by small internet-connected devices. When the device receives a special message telling it to connect to a new server, it copies the server name into a fixed-size memory buffer but forgets to add a null terminator, which is like a full stop that marks the end of a string. As a result, the device may read past the buffer and include extra memory data when it looks up the server name, potentially leaking sensitive information to an attacker who controls the DNS lookup.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.