Skip to content
Memory corruption Advisory Advanced CVE-2019-5038

Nest Labs Openweave Weave tool Print-TLV code execution vulnerability

A stack-based buffer overflow exists in the print-tlv command of the Weave tool when processing deeply nested TLV structures. An attacker could convince a user to open a specially crafted Weave command, potentially leading to code execution.

Lilith Follow

Originally disclosed on Cisco Talos

High 7.5 View original

An exploitable command execution vulnerability exists in the print-tlv command of Weave tool. A specially crafted weave TLV can trigger a stack-based buffer overflow, resulting in code execution.

Lilith (>_>), 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 DumpHandler function uses a fixed-size stack buffer (tabbuf[48]) and copies aDepth bytes into it without checking if aDepth exceeds the buffer size, leading to a stack-based buffer overflow.

Impact

An attacker could potentially execute arbitrary code on the victim's system, as indicated by the CVSS score of 7.5 with high confidentiality, integrity, and availability impact.

What the attacker needed

Victim opens a crafted Weave command

The fix

The vulnerability was fixed by the vendor, as indicated in the timeline with a public release after the fix was scheduled.

How it was found

  1. Create a Weave TLV file with deeply nested structures (using \x15 to enter and \x18 to exit).
  2. Run the weave print-tlv command on the crafted file.
  3. The tool recurses into each container, increasing aDepth.
  4. When aDepth exceeds 48, the strncpy in DumpHandler overflows the tabbuf stack 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.

The Weave tool prints TLV data, which can be nested like folders inside folders. When printing, it uses a fixed-size buffer to store indentation spaces, but if the nesting is too deep, it writes past the buffer, corrupting memory. This could let an attacker run their own code if they trick a user into opening a malicious file.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Lilith

View all

6 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.