Skip to content
Info disclosure Advisory Advanced CVE-2022-41977

OpenImageIO TIFF file string field information disclosure vulnerability

OpenImageIO's TIFF handler creates a string_view with a fixed length taken from LibTIFF's field definition rather than the actual data length read from the file, so a crafted TIFF with a short DateTime field causes an out-of-bounds heap read. An attacker could disclose adjacent heap memory when the file is opened.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Medium 5.3 View original

An out of bounds read vulnerability exists in the way OpenImageIO version v2.3.19.0 processes string fields in TIFF image files. A specially-crafted TIFF file can lead to information disclosure.

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

Likely the code uses the fixed readcount from LibTIFF's field definition as the string length instead of the actual number of bytes read from the file.

Impact

An attacker could read adjacent heap memory, which may contain sensitive process information, and this could be combined with another vulnerability as an information leak to bypass mitigations.

What the attacker needed

Attacker supplies a crafted TIFF file; victim opens the file with OpenImageIO

How it was found

  1. Craft a TIFF file whose DateTime tag directory declares a data length shorter than 20 bytes.
  2. Open the crafted TIFF with OpenImageIO so the TIFF handler parses the directory.
  3. The handler builds a string_view of length 20 over the shorter buffer, reading past its end.

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 TIFF image file stores metadata in tagged fields, and one field (DateTime) is supposed to be exactly 20 bytes. The library trusts that fixed size when it builds a string, even if the file actually supplied fewer bytes, so it reads past the end of the allocated buffer. That lets a malicious image leak small pieces of memory from the program that opens it.

What is Info disclosure?

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

More by Lilith >_>

View all

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

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.