GHSA-jxpf-xq2m-q525

Suggest an improvement
Source
https://github.com/advisories/GHSA-jxpf-xq2m-q525
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-jxpf-xq2m-q525/GHSA-jxpf-xq2m-q525.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-jxpf-xq2m-q525
Aliases
  • CVE-2026-41511
Published
2026-04-22T22:09:01Z
Modified
2026-05-13T13:52:34.912355Z
Severity
  • 6.2 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
OpenMcdf has an Infinite loop DoS via crafted CFB directory cycle
Details

Summary

OpenMcdf does not detect cycles in the directory entry red-black tree of a Compound File Binary (CFB) document. A crafted CFB file with a cycle in the LeftSiblingID / RightSiblingID chain causes Storage.EnumerateEntries() and Storage.OpenStream() to loop indefinitely, consuming the calling thread with no possibility of recovery via try/catch.

Details

CFB directory entries form a red-black tree linked by LeftSiblingID and RightSiblingID fields. OpenMcdf's DirectoryTreeEnumerator and DirectoryTree.TryGetDirectoryEntry traverse this tree without tracking visited node IDs, so a crafted cycle (e.g. entry A's RightSiblingID points to entry B, and entry B's LeftSiblingID points back to entry A) causes traversal to loop indefinitely.

Two distinct code paths are affected:

  • Storage.EnumerateEntries() - DirectoryTreeEnumerator.MoveNext() never returns false; the same entry is yielded on every iteration and the caller's foreach never exits. Heap grows unboundedly as entries accumulate.
  • Storage.OpenStream() - DirectoryTree.TryGetDirectoryEntry loops indefinitely inside DirectoryEntries.TryGetSibling during the name lookup.

PoC

A crafted CFB file with a sibling cycle (see attached) triggers the issue with the following code:

using OpenMcdf;

using var ms = new MemoryStream(File.ReadAllBytes("crafted.cfb"));
using var root = RootStorage.Open(ms);

// Never returns - EnumerateEntries loops indefinitely
foreach (var entry in root.EnumerateEntries())
{
    Console.WriteLine(entry.Name);

    if (entry.Type == EntryType.Stream)
        root.OpenStream(entry.Name); // also hangs depending on the cycle structure
}

Impact

A denial of service affecting any application that opens untrusted CFB files with OpenMcdf. A small crafted input carrying a valid CFB magic header (D0 CF 11 E0 A1 B1 1A E1) is sufficient to pass initial format validation and reach the vulnerable traversal code. No exception is thrown, so try/catch cannot protect callers. The affected thread is unrecoverable without killing the process.

Database specific
{
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-22T22:09:01Z",
    "nvd_published_at": "2026-05-08T19:16:31Z",
    "severity": "MODERATE",
    "cwe_ids": [
        "CWE-835"
    ]
}
References

Affected packages

NuGet / OpenMcdf

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.1.3

Affected versions

1.*
1.5.4
1.5.4.1
1.5.4.22637
2.*
2.0.5739
2.0.5739.40493
2.1.0.33051
2.1.2.1274
2.1.3.34720
2.1.3.34730
2.1.4.23498
2.1.5.22659
2.1.6.28924
2.2.0.1
2.2.1.2
2.2.1.3
2.2.1.4
2.2.1.5
2.2.1.6
2.2.1.8
2.2.1.9
2.2.1.12
2.3.0
2.3.1
2.4.0
2.4.1
3.*
3.0.0-preview1
3.0.0
3.0.1
3.0.2
3.0.3
3.1.0
3.1.1
3.1.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-jxpf-xq2m-q525/GHSA-jxpf-xq2m-q525.json"