# CVE-2022-38495: LIEF vulnerable to heap based buffer overflow via print_binary function

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.34%, higher than 29% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-09-13T20:16:46.000Z
- Modified: 2026-06-17T04:56:44.487Z
- Also known as: GHSA-42vg-2q93-fj6j, PYSEC-2022-276
- Weaknesses: CWE-787
- Assigned by: mitre

## Description

LIEF commit 365a16a was discovered to contain a heap-buffer overflow via the function print_binary at /c/macho_reader.c.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- lief (PyPI): up to 0.12.1; before 0.12.1
- lief-project lief: up to 0.12.1

## Every score

- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/lief-project/LIEF/issues/767> (exploit, issue-tracking, patch, report, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-38495> (advisory)
- <https://github.com/lief-project/LIEF/commit/0033b6312fd311b2e45e379c04a83d77c1e58578> (web)
- <https://github.com/lief-project/LIEF> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/lief/PYSEC-2022-276.yaml> (web)
- <https://github.com/advisories/GHSA-42vg-2q93-fj6j> (advisory)

## Sources

- CVE List: [CVE-2022-38495](https://www.cve.org/CVERecord?id=CVE-2022-38495), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-42vg-2q93-fj6j](https://github.com/advisories/GHSA-42vg-2q93-fj6j), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2022-38495](https://nvd.nist.gov/vuln/detail/CVE-2022-38495), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-276](https://osv.dev/vulnerability/PYSEC-2022-276), CC-BY-4.0, modified 2026-06-10

---

Page: https://cve.day/CVE-2022-38495 · Whole record: https://cve.day/CVE-2022-38495.json · Rebuilt by cve.day 2026-11-25T22:58:14.914Z
