Heap-buffer-overflow in H5MM_memcpy in matio

matio Updated 02 Oct 2025

Summary

22/08/2023
HIGH
Yes i
High
Not published

OSV-2023-723: Heap-buffer-overflow in H5MM_memcpy. Affects matio versions >= f94c087aa9be54ec86a01e267b80fd61108069be, < cf58a80672f4a36490cfe81de80805496218d49b. Fixed in cf58a80672f4a36490cfe81de80805496218d49b. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Matio is an open-source library that provides support for reading and writing MATLAB MAT files. It is commonly used in scientific and engineering applications to exchange data between MATLAB and other programming languages. The library allows users to manipulate and access the data stored in MAT files, which can contain variables, arrays, and structures. However, a vulnerability has been discovered in the library that could lead to a heap-buffer-overflow.

Vulnerability Detail

The vulnerability, identified as OSV-2023-723, originates from a heap-buffer-overflow in the H5MM_memcpy function within matio. This vulnerability allows an attacker to write beyond the bounds of a heap buffer, potentially leading to a crash or arbitrary code execution. The issue was reported through the OSS-Fuzz project and has been assigned a severity rating of HIGH. The vulnerable code path involves H5D__scatter_mem and H5D__scatgath_read functions.

How To Fix

Minimum fixed version

cf58a80672f4a36490cfe81de80805496218d49b

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can consider avoiding the usage of the affected functions or disabling the functionality that relies on them. However, it is strongly advised to apply the official fix as soon as possible to ensure the security and stability of the application.

Conclusion

In conclusion, the matio library is vulnerable to a heap-buffer-overflow in the H5MM_memcpy function. This vulnerability can be exploited to crash the application or potentially execute arbitrary code. Users are advised to update their matio installation to a version that includes the fix or apply the temporary workaround until the fix can be implemented. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for matio →

Share this vulnerability

FAQ

Matio is an open-source library for reading and writing MATLAB MAT files.

A heap-buffer-overflow is a type of vulnerability where a program writes beyond the bounds of a heap-allocated buffer.

This vulnerability can be exploited by an attacker to crash the application or potentially execute arbitrary code.

Yes, the vulnerability has been fixed in a later version of the matio package. Users should update to a version that includes the fix.

This vulnerability has been assigned a severity rating of HIGH.

Related vulnerabilities

Recent vulnerabilities recorded for matio.

How To Fix

Minimum fixed version

cf58a80672f4a36490cfe81de80805496218d49b

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback