Skip to content
Heist/ feed
Back to feed
HighFix available

Excelize: extractPart allocates attacker-controlled, unbounded and negative-sized buffers from CFB directory entries: remote panic / OOM DoS

Type: advisorySources: OSV

### Summary `extractPart` allocates directly from the mscfb directory-entry size with no clamping (`crypt.go:198`, same missing bound at `crypt.go:204`): ```go buf := make([]byte, entry.Size) ``` `entry.Size` is the raw `streamSize` field from the attacker-controlled CFB directory entry (mscfb v1.0.8 `fixFile`, `file.go:109-120`: full uint64 → int64 for major version 4, low uint32 for v3). mscfb only detects short sector chains later, inside `File.Read` (`file.go:485-489` "emergency brake") — i.e. **after** the allocation. The zip path already enforces `UnzipSizeLimit`, and the KDF path bounds work with `maxSpinCount`; this path consults no limit at all. ### Details Two consequences, both execution-confirmed against pristine master (`ecd99d761fe0`, 2026-09-08): 1. **Hard crash**: a version-4 CFB declaring `streamSize = 0xFFFFFFFFFFFFFFFF` yields `entry.Size == -1` → `panic: runtime error: makeslice: len out of range`, which escapes `Decrypt` (`openReaderAt` converts errors, not panics, `excelize.go:210-214`) and kills the process. 2. **Memory exhaustion**: any CFB (v3 suffices) declaring `streamSize` up to `0xFFFFFFFF` forces up to 4 GiB of zeroed allocation from a ~12 KB file — an amplification factor of ~350,000×, trivially repeated per request in memory-limited deployments. Call path: `OpenFile`/`OpenReader`/`OpenBytes` → `openReaderAt` (`excelize.go:208-215`, OLE magic sniff) → `Decrypt` (`crypt.go:145-150`) → `extractPart` (`crypt.go:198`). ### PoC A standalone program (

Products
github.com/xuri/excelize/v2
Affected versions
Not specified
Fixed versions
2.11.1-0.20260912113515-5f636f9dcde5
CVEs
CVE-2026-107215
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 08:45 UTC · Revision 1

Source evidence

Excelize: extractPart allocates attacker-controlled, unbounded and negative-sized buffers from CFB directory entries: remote panic / OOM DoS

core-osv · Original source

Published 8 Oct 2026, 16:31 UTC

### Summary `extractPart` allocates directly from the mscfb directory-entry size with no clamping (`crypt.go:198`, same missing bound at `crypt.go:204`): ```go buf := make([]byte, entry.Size) ``` `entry.Size` is the raw `streamSize` field from the attacker-controlled CFB directory entry (mscfb v1.0.8 `fixFile`, `file.go:109-120`: full uint64 → int64 for major version 4, low uint32 for v3). mscfb only detects short sector chains later, inside `File.Read` (`file.go:485-489` "emergency brake") — i.e. **after** the allocation. The zip path already enforces `UnzipSizeLimit`, and the KDF path bounds work with `maxSpinCount`; this path consults no limit at all. ### Details Two consequences, both execution-confirmed against pristine master (`ecd99d761fe0`, 2026-09-08): 1. **Hard crash**: a version-4 CFB declaring `streamSize = 0xFFFFFFFFFFFFFFFF` yields `entry.Size == -1` → `panic: runtime error: makeslice: len out of range`, which escapes `Decrypt` (`openReaderAt` converts errors, not panics, `excelize.go:210-214`) and kills the process. 2. **Memory exhaustion**: any CFB (v3 suffices) declaring `streamSize` up to `0xFFFFFFFF` forces up to 4 GiB of zeroed allocation from a ~12 KB file — an amplification factor of ~350,000×, trivially repeated per request in memory-limited deployments. Call path: `OpenFile`/`OpenReader`/`OpenBytes` → `openReaderAt` (`excelize.go:208-215`, OLE magic sniff) → `Decrypt` (`crypt.go:145-150`) → `extractPart` (`crypt.go:198`). ### PoC A standalone program (

osv:GHSA-x2q3-8cjh-766f

github.com/xuri/excelize/v2

Fixed versions: 2.11.1-0.20260912113515-5f636f9dcde5

Complete source record
{
  "id": "df773d47d21979bfb927a1951baf27d963b04f9b1f2aca9bfbc2b69e66ee20bc",
  "url": "https://osv.dev/vulnerability/GHSA-x2q3-8cjh-766f",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Excelize: extractPart allocates attacker-controlled, unbounded and negative-sized buffers from CFB directory entries: remote panic / OOM DoS",
    "summary": "### Summary `extractPart` allocates directly from the mscfb directory-entry size with no clamping (`crypt.go:198`, same missing bound at `crypt.go:204`): ```go buf := make([]byte, entry.Size) ``` `entry.Size` is the raw `streamSize` field from the attacker-controlled CFB directory entry (mscfb v1.0.8 `fixFile`, `file.go:109-120`: full uint64 → int64 for major version 4, low uint32 for v3). mscfb only detects short sector chains later, inside `File.Read` (`file.go:485-489` \"emergency brake\") — i.e. **after** the allocation. The zip path already enforces `UnzipSizeLimit`, and the KDF path bounds work with `maxSpinCount`; this path consults no limit at all. ### Details Two consequences, both execution-confirmed against pristine master (`ecd99d761fe0`, 2026-09-08): 1. **Hard crash**: a version-4 CFB declaring `streamSize = 0xFFFFFFFFFFFFFFFF` yields `entry.Size == -1` → `panic: runtime error: makeslice: len out of range`, which escapes `Decrypt` (`openReaderAt` converts errors, not panics, `excelize.go:210-214`) and kills the process. 2. **Memory exhaustion**: any CFB (v3 suffices) declaring `streamSize` up to `0xFFFFFFFF` forces up to 4 GiB of zeroed allocation from a ~12 KB file — an amplification factor of ~350,000×, trivially repeated per request in memory-limited deployments. Call path: `OpenFile`/`OpenReader`/`OpenBytes` → `openReaderAt` (`excelize.go:208-215`, OLE magic sniff) → `Decrypt` (`crypt.go:145-150`) → `extractPart` (`crypt.go:198`). ### PoC A standalone program (",
    "evidence": "osv:GHSA-x2q3-8cjh-766f",
    "products": [
      {
        "name": {
          "value": "github.com/xuri/excelize/v2",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.11.1-0.20260912113515-5f636f9dcde5",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "GHSA-x2q3-8cjh-766f",
      "aliases": [
        "CVE-2026-107215",
        "GHSA-x2q3-8cjh-766f",
        "GO-2026-6689"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "2.3.1"
                },
                {
                  "fixed": "2.11.1-0.20260912113515-5f636f9dcde5"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/xuri/excelize/v2",
            "purl": "pkg:golang/github.com/xuri/excelize/v2",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-x2q3-8cjh-766f/GHSA-x2q3-8cjh-766f.json"
          }
        }
      ],
      "modified": "2026-10-19T21:41:17.838565606Z",
      "provider": "osv",
      "references": [
        "https://github.com/qax-os/excelize/security/advisories/GHSA-x2q3-8cjh-766f",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-107215",
        "https://github.com/qax-os/excelize/pull/2396",
        "https://github.com/qax-os/excelize/commit/5f636f9dcde55911f14290060b017f0cc88cd694",
        "https://github.com/qax-os/excelize"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-789"
        ],
        "severity": "HIGH",
        "github_reviewed": true,
        "nvd_published_at": "2026-10-07T18:17:19Z",
        "github_reviewed_at": "2026-10-08T16:31:26Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-107215",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 376797,
  "published_at": "2026-10-08T16:31:26+00:00"
}