Integer overflow in YARA - CVE-2021-3402

 

Integer overflow in YARA - CVE-2021-3402

Published: January 29, 2021 / Updated: March 9, 2026


Vulnerability identifier: #VU50140
CSH Severity: Medium
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-3402
CWE-ID: CWE-190
Exploitation vector: Remote access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a remote attacker to perform a denial of service (DoS) attack.

The vulnerability exists due to integer overflow within the macho_parse_fat_file() function in the macho module. A remote attacker can pass specially crafted file to the application, trigger integer overflow and perform a denial of service (DoS) attack.


Affected software

YARA
Fedora
Ubuntu
yara (Ubuntu package)
python-yara
yara

How to mitigate CVE-2021-3402

Install updates from vendor's website.

YARA - update to 4.0.4
yara (Ubuntu package) - addressed in versions 3.4.0+dfsg-2ubuntu0.1~esm1, 3.7.1-1ubuntu2+esm1, 3.9.0-1ubuntu0.1~esm1
python-yara - addressed in versions 4.1.0-1.el7, 4.1.0-1.el8, 4.1.0-1.fc33, 4.1.0-1.fc34
yara - addressed in versions 4.1.0-1.el7, 4.1.0-1.el8, 4.1.0-1.fc33, 4.1.0-1.fc34

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins