# CVE-2021-3402: An integer overflow and several buffer overflow reads in libyara/modules/macho/macho.c in YARA v4.0.3 and earlier could allow an attacker t…

- Severity: Critical 9.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/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): 2.20%, higher than 83% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2021-05-14T20:05:25.000Z
- Modified: 2026-06-17T04:05:01.763Z
- Weaknesses: CWE-190
- Assigned by: redhat

## Description

An integer overflow and several buffer overflow reads in libyara/modules/macho/macho.c in YARA v4.0.3 and earlier could allow an attacker to either cause denial of service or information disclosure via a malicious Mach-O file. Affects all versions before libyara 4.0.4

(As written by CVE List.)

## Affected

- libyara: libyara 4.0.4
- virustotal yara: before 4.0.4
- fedoraproject fedora: 33; 34

## Every score

- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- NVD: CVSS:2.0 6.4 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:P`

## References

- <https://www.openwall.com/lists/oss-security/2021/01/29/2> (exploit, mailing-list, third-party-advisory)
- <https://www.x41-dsec.de/lab/advisories/x41-2021-001-yara/> (exploit, third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XXM224OLGI6KAOROLDPPGGCZ2OQVQ6HH/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FKNXSH5ERG6NELTXCYVJLUPJJJ2TNEBD/> (vendor-advisory)
- <https://bugzilla.redhat.com/show_bug.cgi?id=1930175> (issue-tracking, third-party-advisory)

## Sources

- CVE List: [CVE-2021-3402](https://www.cve.org/CVERecord?id=CVE-2021-3402), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-3402](https://nvd.nist.gov/vuln/detail/CVE-2021-3402), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-3402 · Whole record: https://cve.day/CVE-2021-3402.json · Rebuilt by cve.day 2026-11-25T22:58:01.431Z
