{"id":"UBUNTU-CVE-2025-50343","details":"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.","modified":"2026-01-20T19:09:00.729921Z","published":"2025-12-30T20:16:00Z","upstream":["CVE-2025-50343"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2025-50343"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2025-50343"},{"type":"REPORT","url":"https://github.com/tbeu/matio/issues/275"},{"type":"REPORT","url":"https://github.com/zakkanijia/POC/blob/main/matio/CVE-2025-50343/matio.md"}],"affected":[{"package":{"name":"libmatio","ecosystem":"Ubuntu:Pro:14.04:LTS","purl":"pkg:deb/ubuntu/libmatio@1.5.2-1ubuntu1+esm1?arch=source&distro=esm-infra-legacy/trusty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.1-1","1.5.2-1","1.5.2-1ubuntu1","1.5.2-1ubuntu1+esm1"],"ecosystem_specific":{"binaries":[{"binary_version":"1.5.2-1ubuntu1+esm1","binary_name":"libmatio-dev"},{"binary_version":"1.5.2-1ubuntu1+esm1","binary_name":"libmatio2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-50343.json"}},{"package":{"name":"libmatio","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/libmatio@1.5.3-1ubuntu0.1~esm1?arch=source&distro=esm-apps/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.2-3build2","1.5.3-1","1.5.3-1ubuntu0.1~esm1"],"ecosystem_specific":{"binaries":[{"binary_version":"1.5.3-1ubuntu0.1~esm1","binary_name":"libmatio-dev"},{"binary_version":"1.5.3-1ubuntu0.1~esm1","binary_name":"libmatio2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-50343.json"}},{"package":{"name":"libmatio","ecosystem":"Ubuntu:Pro:18.04:LTS","purl":"pkg:deb/ubuntu/libmatio@1.5.11-1ubuntu0.1~esm1?arch=source&distro=esm-apps/bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.10-1","1.5.11-1","1.5.11-1ubuntu0.1~esm1"],"ecosystem_specific":{"binaries":[{"binary_version":"1.5.11-1ubuntu0.1~esm1","binary_name":"libmatio-dev"},{"binary_version":"1.5.11-1ubuntu0.1~esm1","binary_name":"libmatio4"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-50343.json"}},{"package":{"name":"libmatio","ecosystem":"Ubuntu:Pro:20.04:LTS","purl":"pkg:deb/ubuntu/libmatio@1.5.17-3ubuntu0.1~esm2?arch=source&distro=esm-apps/focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.13-3","1.5.17-3","1.5.17-3ubuntu0.1~esm1","1.5.17-3ubuntu0.1~esm2"],"ecosystem_specific":{"binaries":[{"binary_version":"1.5.17-3ubuntu0.1~esm2","binary_name":"libmatio-dev"},{"binary_version":"1.5.17-3ubuntu0.1~esm2","binary_name":"libmatio9"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-50343.json"}},{"package":{"name":"libmatio","ecosystem":"Ubuntu:Pro:22.04:LTS","purl":"pkg:deb/ubuntu/libmatio@1.5.21-1ubuntu0.1~esm1?arch=source&distro=esm-apps/jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.19-2","1.5.21-1","1.5.21-1ubuntu0.1~esm1"],"ecosystem_specific":{"binaries":[{"binary_version":"1.5.21-1ubuntu0.1~esm1","binary_name":"libmatio-dev"},{"binary_version":"1.5.21-1ubuntu0.1~esm1","binary_name":"libmatio11"},{"binary_version":"1.5.21-1ubuntu0.1~esm1","binary_name":"matio-tools"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-50343.json"}},{"package":{"name":"libmatio","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/libmatio@1.5.26-1build3?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.23-2","1.5.24-1","1.5.26-1","1.5.26-1build1","1.5.26-1build2","1.5.26-1build3"],"ecosystem_specific":{"binaries":[{"binary_version":"1.5.26-1build3","binary_name":"libmatio-dev"},{"binary_version":"1.5.26-1build3","binary_name":"libmatio11"},{"binary_version":"1.5.26-1build3","binary_name":"matio-tools"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-50343.json"}},{"package":{"name":"libmatio","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/libmatio@1.5.28-2?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.28-1build1","1.5.28-2"],"ecosystem_specific":{"binaries":[{"binary_version":"1.5.28-2","binary_name":"libmatio-dev"},{"binary_version":"1.5.28-2","binary_name":"libmatio13"},{"binary_version":"1.5.28-2","binary_name":"matio-tools"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-50343.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}