Skip to content
Fencer Intel
medium 5.9

CVE-2021-41253 json

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

published 5y ago modified 4mo ago also EUVD-2021-28299

cvss
5.9
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.9%
EPSS 1.9% chance of exploitation in 30 days, percentile 79%
public exploits
0
none known

Summary

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.

Patch / fix

  • zydis Debian 14, Debian 13, Debian 12 3.2.1-1

debian advisories DEBIAN-CVE-2021-41253

Is CVE-2021-41253 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Exploit prediction

1.86% chance of exploitation in the next 30 days, higher than 79% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

  • huntr.dev https://huntr.dev/bounties/d2536d7d-36ce-4723-928c-98d1ee039784 referenced PoC, tagged "exploit" by a source, unverified
  • huntr.dev https://huntr.dev/bounties/96b0a482-7041-45b1-9327-c6a4a8f32d3a referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD 3.1 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 6.8 AV:N/AC:M/Au:N/C:P/I:P/A:P

Affected products

  • zyantific zydis

Classification

Weakness
  • CWE-122 Heap-based Buffer Overflow
  • CWE-457 Use of Uninitialized Variable
  • CWE-908 Use of Uninitialized Resource

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.