CVE-2021-41253

Public Exploit
Possible heap buffer overflow when using zycore string functions in formatter hooks

Description

Zydis is an x86/x86-64 disassembler library. Users of Zydis versions v3.2.0 and older that use the string functions provided in `zycore` in order to append untrusted user data to the formatter buffer within their custom formatter hooks can run into heap buffer overflows. Older versions of Zydis failed to properly initialize the string object within the formatter buffer, forgetting to initialize a few fields, leaving their value to chance. This could then in turn cause zycore functions like `ZyanStringAppend` to make incorrect calculations for the new target size, resulting in heap memory corruption. This does not affect the regular uncustomized Zydis formatter, because Zydis internally doesn't use the string functions in zycore that act upon these fields. However, because the zycore string functions are the intended way to work with the formatter buffer for users of the library that wish to extend the formatter, we still consider this to be a vulnerability in Zydis. This bug is patched starting in version 3.2.1. As a workaround, users may refrain from using zycore string functions in their formatter hooks until updating to a patched version.

Categories

5.9
CVSS
Severity: Medium
CVSS 3.1 •
CVSS 2.0 •
EPSS 0.55%
Third-Party Advisory github.com Third-Party Advisory github.com Third-Party Advisory huntr.dev Third-Party Advisory huntr.dev
Affected: zyantific zydis
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2021-41253?
CVE-2021-41253 has been scored as a medium severity vulnerability.
How to fix CVE-2021-41253?
To fix CVE-2021-41253, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2021-41253 being actively exploited in the wild?
It is possible that CVE-2021-41253 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~1% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2021-41253?
CVE-2021-41253 affects zyantific zydis.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.