Skip to content
Memory corruption Advisory Advanced CVE-2026-8822

VTK vtkDEMReader ReadProfiles memory corruption vulnerability

The vtkDEMReader in VTK parses USGS DEM files and writes elevation samples into a buffer sized from the Type A header, but the write loop is driven by unvalidated B-record fields. A crafted DEM file can therefore cause a heap out-of-bounds write, crashing the process and potentially corrupting the heap.

Emmanuel Tacheau Follow

Originally disclosed on Cisco Talos

High 7.5 View original

A memory corruption vulnerability exists in the vtkDEMReader ReadProfiles functionality of vtk (version(s): 9.6.1). A specially crafted USGS DEM can lead to a buffer overflow.

Emmanuel Tacheau, 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 buffer is sized from the Type A record's grid dimensions while the write loop is driven by independently parsed B-record fields, and no check ensures the computed last row stays within the grid.

Impact

A crafted DEM file causes a heap buffer overflow that crashes the process under ASan and silently corrupts the heap on normal builds, giving a denial of service and possible further exploitation.

What the attacker needed

Attacker-supplied DEM file; victim opens the file with VTK

The fix

The reader should validate that the B-record profile rows and columns fall within the grid dimensions parsed from the Type A record before writing, and should check the return value of the header parse.

How it was found

  1. Open a crafted USGS DEM file with vtkDEMReader and trigger the pipeline update.
  2. The reader parses the Type A record and allocates the output buffer from the declared grid extent.
  3. The reader parses the B-record profile fields, which declare more rows than the grid contains.
  4. The write loop runs past the end of the allocated buffer, producing a heap overflow.

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.

A DEM file is a text format for terrain data, and this library reads it to build a grid of heights. The reader first sizes a memory buffer from one part of the file, then fills it using numbers from another part, without checking that the second part fits inside the first. A malicious file can make the program write past the end of its buffer, which can crash it or corrupt memory.

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 Emmanuel Tacheau

View all

58 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.