CVE-2023-23625
JSON

5.9medium

Denial of service in HAMT Decoding in go-unixfs

Severity
5.9medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.69% (higher than 54% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-q264-w97q-q778GO-2023-1557

Description

go-unixfs is an implementation of a unix-like filesystem on top of an ipld merkledag. Trying to read malformed HAMT sharded directories can cause panics and virtual memory leaks. If you are reading untrusted user input, an attacker can then trigger a panic. This is caused by bogus `fanout` parameter in the HAMT directory nodes. Users are advised to upgrade to version 0.4.3 to resolve this issue. Users unable to upgrade should not feed untrusted user data to the decoding functions.

Affected

Product or packageVersionsReported by
ipfs go-unixfs< 0.4.3CVE List
github.com/ipfs/go-unixfs (Go)before 0.4.3GitHub Advisory Database, Go Vulnerability Database
protocol go-unixfsbefore 0.4.3NVD

All scores

GitHub_M5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-400

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

go-unixfs is an implementation of a unix-like filesystem on top of an ipld merkledag. Trying to read malformed HAMT sharded directories can cause panics and virtual memory leaks. If you are reading untrusted user input, an attacker can then trigger a panic. This is caused by bogus `fanout` parameter in the HAMT directory nodes. Users are advised to upgrade to version 0.4.3 to resolve this issue. Users unable to upgrade should not feed untrusted user data to the decoding functions.

GitHub Advisory Database
Impact

Trying to read malformed HAMT sharded directories can cause panics and virtual memory leaks. If you are reading untrusted user input, an attacker can then trigger a panic.

This is caused by bogus fanout parameter in the HAMT directory nodes. This include checks returned in ipfs/go-bitfield GHSA-2h6c-j3gf-xp9r, as well as limiting the fanout to <= 1024 (to avoid attempts of arbitrary sized allocations).

Patches
Workarounds

Do not feed untrusted user data to the decoding functions.

References
Go Vulnerability Database

Trying to read malformed HAMT sharded directories can cause panics and virtual memory leaks. If you are reading untrusted user input, an attacker can then trigger a panic.

This is caused by bogus "fanout" parameter in the HAMT directory nodes. A workaround is to not feed untrusted user data to the decoding functions.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-23625 changed 2025-03-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-q264-w97q-q778 changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2023-1557 changed 2024-05-20CC-BY-4.0
NVDCVE-2023-23625 changed 2026-06-17Public domain