# CVE-2021-37501: Memory corruption in n/a

> Attackers can cause a denial of service in HDF5 h5dump via a buffer overflow in the string printing utility.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Feb 2023
- **Updated:** 26 Mar 2025
- **Also known as:** AZL-13349, AZL-34796, DEBIAN-CVE-2021-37501, ECHO-7e9d-d6d6-80fc, GHSA-rfgw-5vq3-wrjf, ROOT-OS-DEBIAN-12-CVE-2021-37501, SUSE-SU-2023:0691-1, SUSE-SU-2023:0777-1, SUSE-SU-2023:1563-1, UBUNTU-CVE-2021-37501

## What is CVE-2021-37501?

CVE-2021-37501 is a high-severity memory corruption vulnerability in Hdfgroup Hdf5, published on 3 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Buffer Overflow vulnerability in HDFGroup hdf5-h5dump 1.12.0 through 1.13.0 allows attackers to cause a denial of service via h5tools_str_sprint in /hdf5/tools/lib/h5tools_str.c.

Weakness: CWE-787 (Out-of-bounds Write)

## Which versions are affected by CVE-2021-37501?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `hdf5_1_10_8-gnu-hpc` | SUSE:Linux Enterprise Module for HPC 12 | All versions | 1.10.8-3.18.1 |
| `hdf5_1_10_8-gnu-mvapich2-hpc` | SUSE:Linux Enterprise Module for HPC 12 | All versions | 1.10.8-3.18.1 |
| `hdf5_1_10_8-gnu-openmpi1-hpc` | SUSE:Linux Enterprise Module for HPC 12 | All versions | 1.10.8-3.18.1 |
| `hdf5_1_10_8-gnu-hpc` | SUSE:Linux Enterprise Module for HPC 15 SP3 | All versions | 1.10.8-150300.4.9.1 |
| `hdf5_1_10_8-gnu-mpich-hpc` | SUSE:Linux Enterprise Module for HPC 15 SP3 | All versions | 1.10.8-150300.4.9.1 |
| `hdf5_1_10_8-gnu-mvapich2-hpc` | SUSE:Linux Enterprise Module for HPC 15 SP3 | All versions | 1.10.8-150300.4.9.1 |
| `hdf5_1_10_8-gnu-openmpi3-hpc` | SUSE:Linux Enterprise Module for HPC 15 SP3 | All versions | 1.10.8-150300.4.9.1 |
| `hdf5_1_10_8-gnu-openmpi4-hpc` | SUSE:Linux Enterprise Module for HPC 15 SP3 | All versions | 1.10.8-150300.4.9.1 |
| `hdf5_1_10_8-gnu-hpc` | SUSE:Linux Enterprise Module for HPC 15 SP4 | All versions | 1.10.8-150400.3.6.1 |
| `hdf5_1_10_8-gnu-mpich-hpc` | SUSE:Linux Enterprise Module for HPC 15 SP4 | All versions | 1.10.8-150400.3.6.1 |
| `hdf5_1_10_8-gnu-mvapich2-hpc` | SUSE:Linux Enterprise Module for HPC 15 SP4 | All versions | 1.10.8-150400.3.6.1 |
| `hdf5_1_10_8-gnu-openmpi3-hpc` | SUSE:Linux Enterprise Module for HPC 15 SP4 | All versions | 1.10.8-150400.3.6.1 |
| `hdf5_1_10_8-gnu-openmpi4-hpc` | SUSE:Linux Enterprise Module for HPC 15 SP4 | All versions | 1.10.8-150400.3.6.1 |
| `hdf5` | SUSE:Linux Enterprise Module for Package Hub 15 SP4 | All versions | 1.10.8-150400.3.6.1 |
| `hdf5_1_10_8-gnu-hpc` | SUSE:Linux Enterprise Module for Package Hub 15 SP4 | All versions | 1.10.8-150400.3.6.1 |
| `hdf5_1_10_8-gnu-mpich-hpc` | SUSE:Linux Enterprise Module for Package Hub 15 SP4 | All versions | 1.10.8-150400.3.6.1 |
| `hdf5_1_10_8-gnu-mvapich2-hpc` | SUSE:Linux Enterprise Module for Package Hub 15 SP4 | All versions | 1.10.8-150400.3.6.1 |
| `hdf5_1_10_8-gnu-openmpi3-hpc` | SUSE:Linux Enterprise Module for Package Hub 15 SP4 | All versions | 1.10.8-150400.3.6.1 |
| `hdf5_1_10_8-gnu-openmpi4-hpc` | SUSE:Linux Enterprise Module for Package Hub 15 SP4 | All versions | 1.10.8-150400.3.6.1 |
| `hdf5_1_10_8-gnu-hpc` | openSUSE:Leap 15.4 | All versions | 1.10.8-150300.4.9.1 |
| `hdf5_1_10_8-gnu-mpich-hpc` | openSUSE:Leap 15.4 | All versions | 1.10.8-150300.4.9.1 |
| `hdf5_1_10_8-gnu-mvapich2-hpc` | openSUSE:Leap 15.4 | All versions | 1.10.8-150300.4.9.1 |
| `hdf5_1_10_8-gnu-openmpi3-hpc` | openSUSE:Leap 15.4 | All versions | 1.10.8-150300.4.9.1 |
| `hdf5_1_10_8-gnu-openmpi4-hpc` | openSUSE:Leap 15.4 | All versions | 1.10.8-150300.4.9.1 |

Products: Hdfgroup Hdf5.

## How do I fix CVE-2021-37501?

Apply the vendor's patch.

## Is CVE-2021-37501 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-37501 exists.

## Other vulnerabilities in Hdfgroup Hdf5

- [CVE-2024-32608](https://insights.sbomify.com/CVE-2024-32608/): Memory corruption in n/a (critical 9.8)
- [CVE-2024-29157](https://insights.sbomify.com/CVE-2024-29157/): Memory corruption in n/a (critical 9.8)
- [CVE-2024-29159](https://insights.sbomify.com/CVE-2024-29159/): Memory corruption in n/a (critical 9.8)
- [CVE-2024-29164](https://insights.sbomify.com/CVE-2024-29164/): Memory corruption in n/a (critical 9.8)
- [CVE-2024-32611](https://insights.sbomify.com/CVE-2024-32611/): Other in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-37501 and fix it if it is affected.

What it is: CVE-2021-37501 is a high-severity memory corruption vulnerability in Hdfgroup Hdf5, published on 3 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-37501 exists.

Affected product: Hdfgroup Hdf5. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-37501/ (Markdown: https://insights.sbomify.com/CVE-2021-37501/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-37501
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-37501
- OSV: https://osv.dev/vulnerability/CVE-2021-37501

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-37501/
Summaries are generated and may contain mistakes; the official description above is the record.
