---
id: CVE-2025-50343
title: An issue was discovered in matio 1.5.28
summary: >-
  An issue was discovered in matio 1.5.28. A heap-based memory corruption can
  occur in Mat_VarCreateStruct() when the nfields value does not match the
  actual number of strings in the fields array. This leads to out-of-bounds
  reads and inva…
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-122
vendor: matio_project
product: matio
affected:
  - matio = 1.5.28
published: '2025-12-30'
updated: '2026-09-30'
sourceUpdated: '2026-09-30T18:17:57.957'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2025-50343'
references:
  - url: 'https://github.com/tbeu/matio/issues/275'
    label: cve@mitre.org
  - url: 'https://github.com/zakkanijia/POC/blob/main/matio/CVE-2025-50343/matio.md'
    label: cve@mitre.org
  - url: 'https://github.com/tbeu/matio/issues/275'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
  - url: 'https://github.com/zakkanijia/POC/blob/main/matio/CVE-2025-50343/matio.md'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
  - cve.org
  - exploit-available
epss: 0.00411
epssPercentile: 0.32911
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'yes'
  technicalImpact: total
  timestamp: '2026-01-02T15:59:53.648727Z'
ingestedAt: '2026-09-30T18:17:24.540Z'
---

## Overview

An issue was discovered in matio 1.5.28. A heap-based memory corruption can occur in Mat_VarCreateStruct() when the nfields value does not match the actual number of strings in the fields array. This leads to out-of-bounds reads and invalid memory frees during cleanup, potentially causing a segmentation fault or heap corruption. NOTE: Multiple third-parties note that the available evidence does not demonstrate a vulnerability exploitable through an attacker-controlled input path.

## Affected

- `matio = 1.5.28`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
