Infinite loop Affecting openmcdf package, versions [,3.1.4)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DOTNET-OPENMCDF-16770142
  • published20 May 2026
  • disclosed13 May 2026
  • creditPaweł Łukasik

Introduced: 13 May 2026

NewCVE-2026-45785  (opens in a new tab)
CWE-835  (opens in a new tab)

How to fix?

Upgrade OpenMcdf to version 3.1.4 or higher.

Overview

OpenMcdf is a fully .NET / C# library to manipulate Compound File Binary File Format files, also known as Structured Storage.

Affected versions of this package are vulnerable to Infinite loop involving the TryGetDirectoryEntry() function, which is accessible via RootStorage.OpenStorage() and RootStorage.OpenStream(). An attacker can cause a thread to enter an uncaught and unrecoverable loop by providing a malicious CFB file with cyclic sibling directory entries. Cycles are properly detected for DirectoryTreeEnumerator, but individual entry lookups are vulnerable to the pattern described here.

PoC

using OpenMcdf;

using var fs = File.OpenRead("repro_enumerate.cfb");
using var root = RootStorage.Open(fs);
foreach (var entry in root.EnumerateEntries())   // safe: Brent's catches enumeration cycles
{
    if (entry.Type == EntryType.Stream)
        _ = root.OpenStream(entry.Name);          // hangs: lookup path has no cycle detection
}

CVSS Base Scores

version 4.0
version 3.1