CVE-2025-50343 Details
Description
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.
A heap-based memory corruption vulnerability has been identified in the Matio library version 1.5.28. The issue arises in the Mat_VarCreateStruct() function when the nfields parameter does not align with the actual number of strings in the fields array. This mismatch can lead to out-of-bounds memory reads and improper memory deallocations during cleanup, potentially causing a segmentation fault or heap corruption. The vulnerability exists because the function does not validate that the fields array contains the expected number of non-NULL strings, allowing uninitialized memory to be accessed and freed incorrectly, which can result in undefined behavior.
It is recommended to add validation in the Mat_VarCreateStruct() function to ensure that the fields parameter is either NULL (when nfields is 0) or contains exactly nfields non-NULL pointers.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 2, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/tbeu/matio/issues/275 | CISA-ADP | ExploitIssue TrackingThird Party Advisory |
| https://github.com/zakkanijia/POC/blob/main/matio/CVE-2025-50343/matio.md | CISA-ADP | ExploitThird Party Advisory |
| https://github.com/tbeu/matio/issues/275 | [email protected] | ExploitIssue TrackingThird Party Advisory |
| https://github.com/zakkanijia/POC/blob/main/matio/CVE-2025-50343/matio.md | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-122 | Heap-based Buffer Overflow | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| matio project matio | 1.5.28 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 9, 2026 | Initial Analysis | [email protected] |
| Jan 2, 2026 | CVE Modified | CISA-ADP |
| Dec 30, 2025 | New CVE Received | [email protected] |