go package report

Is github.com/xuri/excelize safe?

2 known vulnerabilities, worst severity HIGH.

// reach

0 direct dependencies

none carry a known advisory

    0 packages depend on it

    an advisory here reaches each of them

      Create a free accountfor every dependency path, dependent and what to upgrade
      // ai model usage

      Tracked for PyPI packages. HuggingFace models declare Python dependencies, so go packages are not covered.


      cvss
      0.0
      high

      severity out of 10

      epss
      0.00%
      medium

      chance of exploitation in 30 days, 49th percentile of all CVEs

      xyz score
      not scored

      CyberXYZ composite out of 10

      fig. 01 — GHSA-q5j5-6p94-4gwc, the advisory selected below

      // 2 advisories

      GHSA-q5j5-6p94-4gwc

      HIGHCVE-2026-59161
      // summary

      Excelize's prior row-bound fix for GHSA-h69g / CVE-2026-54063 protects the checked worksheet parser, but the streaming worksheet reader used by Rows and GetRows does not enforce the same TotalRows bound on the row r attribute. A small XLSX file can set a row number above Excelize's maximum row (1048576) and omit the cell coordinate. GetRows then appends empty rows up to the attacker-controlled row index and returns success.

      This was reproduced on the current default branch commit 1213a8bd7c5a and the latest release tag v2.10.1 (5ad5ab3af005).

      // affected package
      • Package: github.com/xuri/excelize/v2
      • Tested affected versions: current default branch at 1213a8bd7c5a, and release v2.10.1
      • Fixed version: none known at the time of this report
      // impact

      An attacker who can provide an XLSX file to an application that calls GetRows can cause memory and CPU usage to scale with an attacker-controlled row number, even though the file itself is tiny. This is an availability issue and appears to be an incomplete coverage variant of the GHSA-h69g row-index allocation class.

      In the conservative PoC, row r="2000000" returned a [][]string with length 2,000,000 and allocated about 46 MB. Larger row numbers scale the allocation further.

      // root cause

      The checked parser path validates row numbers:

      • excelize.go: checkRowNum(r int) rejects negative rows and rows greater than TotalRows.
      • excelize.go: checkSheet() calls checkRowNum(r.R) before allocating sheet rows.
      • workSheetReader() invokes checkSheet() / checkRow() before returning a cached worksheet.

      The streaming path does not use that checked parser:

      • rows.go: Rows(sheet) opens an XML decoder directly.
      • Rows.Next() accepts the row r attribute and assigns it to the iterator's current row without applying checkRowNum().
      • Rows.Columns() also assigns row r to the iterator state without applying checkRowNum().
      • GetRows() appends empty row slices for the gap between the previous row and the current row.

      Because a cell without an r coordinate can still contain a value, the worksheet can avoid cell-coordinate row validation while still causing GetRows() to materialize rows up to the out-of-range row number.

      // minimal worksheet payload
        
          0
        

      The workbook also contains a normal sharedStrings.xml with one string (ok).

      // reproduction

      A minimal Go harness creates the XLSX in memory and calls GetRows("Sheet1"):

      rows, err := f.GetRows("Sheet1")
      fmt.Println("rows_len:", len(rows))
      if len(rows) > 0 {
          fmt.Println("last_row:", rows[len(rows)-1])
      }
      fmt.Printf("returned error: %T %v\n", err, err)

      Observed output on current default branch commit 1213a8bd7c5a:

      == streaming GetRows row r=2000000 cell without r ==
      rows_len: 2000000
      last_row: [ok]
      returned error:  
      elapsed=21ms alloc_delta=46MB

      Observed output on latest release tag v2.10.1:

      == streaming GetRows row r=2000000 cell without r ==
      rows_len: 2000000
      last_row: [ok]
      returned error:  
      elapsed=14ms alloc_delta=46MB

      A control using the checked parser with row r="1048577" and c r="A1048577" correctly returns row number exceeds maximum limit, confirming this report is about inconsistent enforcement in the streaming path rather than a missing global constant.

      // expected behavior

      Rows / GetRows should reject row numbers greater than TotalRows with the same error behavior as the checked parser path.

      // suggested remediation
      • Apply the same row-bound validation in the streaming reader immediately after parsing a row r attribute.
      • Preserve and return row parsing errors from GetRows() instead of silently continuing or returning only Rows.Close() errors.
      • Add regression tests for GetRows() on a worksheet containing row r="1048577" with a cell value but no cell r coordinate.
      // cvss v4.0 vector

      CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

      Attack vector
      Network
      Attack complexity
      Low
      Attack requirements
      None
      Privileges required
      None
      User interaction
      None
      Confidentiality (vulnerable system)
      None
      Integrity (vulnerable system)
      None
      Availability (vulnerable system)
      High
      Confidentiality (subsequent systems)
      None
      Integrity (subsequent systems)
      None
      Availability (subsequent systems)
      None

      Checked 2026-09-26 at 00:59 UTC. The most recent advisory here was published 2026-09-10. Updated continuously from NVD, GHSA, OSV and CNA feeds.

      Think a verdict here is wrong? Tell us — we respond within 2 business days.