CVE-2021-41253
What it is
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.
At a glance
- Exploitability
- Can be exploited over the network without logging in. High risk of service disruption.
- Exploit odds
- 1.9% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 1.9% in the next 30 days (EPSS).
- Severity: 5.9 MEDIUM (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 1.9% · EPSS, next 30 days
- Weakness
- CWE-122
- Record status
- Modified
Affected
- Zyantific Zydis ≤ 3.2.0
Attack profile CVSS 3.1 · 5.9
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Raw vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2021-41253.md and follow it. Check whether this project is affected by CVE-2021-41253. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/zyantific/zydis/commit/55dd08c210722aed81b38132f5fd4a04ec1943b5
- https://github.com/zyantific/zydis/security/advisories/GHSA-q42v-hv86-3m4g
- https://huntr.dev/bounties/d2536d7d-36ce-4723-928c-98d1ee039784
- https://github.com/zyantific/zydis/commit/55dd08c210722aed81b38132f5fd4a04ec1943b5
- https://github.com/zyantific/zydis/security/advisories/GHSA-q42v-hv86-3m4g
- https://huntr.dev/bounties/d2536d7d-36ce-4723-928c-98d1ee039784
References
- https://github.com/zyantific/zydis/commit/55dd08c210722aed81b38132f5fd4a04ec1943b5
- https://github.com/zyantific/zydis/security/advisories/GHSA-q42v-hv86-3m4g
- https://huntr.dev/bounties/96b0a482-7041-45b1-9327-c6a4a8f32d3a
- https://huntr.dev/bounties/d2536d7d-36ce-4723-928c-98d1ee039784
- https://github.com/zyantific/zydis/commit/55dd08c210722aed81b38132f5fd4a04ec1943b5
- https://github.com/zyantific/zydis/security/advisories/GHSA-q42v-hv86-3m4g
- https://huntr.dev/bounties/96b0a482-7041-45b1-9327-c6a4a8f32d3a
- https://huntr.dev/bounties/d2536d7d-36ce-4723-928c-98d1ee039784