CWE-787: Out-of-bounds Write
28 real-world CVEs classified as CWE-787: Out-of-bounds Write. Each one is a short hands-on exercise in Hexret: find the vulnerable line, follow the exploit and learn the fix.
- CVE-2026-46300high 7.82026
Fragnesia: Linux shared-fragment marker loss
Socket-buffer coalescing can transfer page-backed fragment descriptors without their shared marker, causing later ESP processing to decrypt shared data in place.
- CVE-2025-41238critical 9.32025
VMware PVSCSI fixed-capacity scatter/gather overflow
The PVSCSI emulator reallocates its internal scatter/gather array to the same 0x4000-byte size for every entry after 512, then writes guest-controlled 16-byte elements beyond the 1024-entry heap capacity.
- CVE-2024-37079critical 9.82024
VMware vCenter DCERPC response-size underflow
A DCERPC response can fill 4092 bytes before its eight-byte authentication header is counted, so unsigned remaining-space arithmetic wraps from negative four to 0xfffffffc and admits a heap overwrite.
- CVE-2024-2961high 8.82024
glibc iconv ISO-2022-CN-EXT out-of-bounds write
Converting to a multibyte charset, one escape-sequence path skips its output-bounds check, writing up to 3 fixed bytes past the buffer.
- CVE-2024-21762critical 9.82024
FortiOS two-byte chunk-trailer stack overwrite
A padded zero-length HTTP chunk carries a large raw line length into trailer processing, where an incomplete remaining-space check permits a fixed CRLF pair to be written beyond a stack buffer.
- CVE-2023-4911high 7.82023
Looney Tunables: glibc ld.so GLIBC_TUNABLES buffer overflow
The loader's tunables parser copies each recognized name=value pair into a fixed-size buffer, but a malformed name=name=value string is parsed and appended twice, overflowing the buffer during setuid startup.
- CVE-2023-5217high 8.82023
libvpx VP8 encoder heap overflow on thread/height reconfigure
A per-row worker array sized from the current frame height is only reallocated when threads exceed one, so a reconfigure that drops to a single thread while growing the frame leaves it undersized and the encoder writes past it.
- CVE-2023-4863high 8.82023
libwebp lossless Huffman table heap overflow (BLASTPASS)
A variable-length code table is written into a buffer sized only for its first level, so crafted long codes make the builder append second-level tables past the allocation: an out-of-bounds heap write reached by decoding one image.
- CVE-2023-20869high 8.22023
VMware virtual Bluetooth SDP raw-integer stack overflow
A guest-controlled SDP element size reaches a raw-integer reader that copies into a 16-byte stack array without first rejecting larger element lengths.
- CVE-2022-3602high 7.52022
SpookySSL: OpenSSL X.509 punycode four-byte overflow
The punycode decoder allowed insertion when its output buffer was already full, so a crafted X.509 SmtpUTF8Mailbox domain processed during name-constraint checks could shift one attacker-controlled unsigned integer past the stack buffer.
- CVE-2022-34718critical 9.82022
EvilESP: Windows IPv6 reassembly one-byte overwrite
A decrypted ESP payload can make the saved IPv6 Next Header offset include attacker-sized payload and padding, then reassembly uses that offset to write one byte into a much smaller header allocation.
- CVE-2022-37434critical 9.82022
zlib inflate gzip-header extra-field over-read (CVE-2022-37434)
When a gzip extra field is larger than the caller's buffer and arrives across several inflate calls, the write offset outgrows the buffer and the copy's size clamp underflows, corrupting the heap.
- CVE-2021-4034high 7.82022
polkit pkexec empty-argv environment corruption (PwnKit, CVE-2021-4034)
Run with an empty argument vector, the setuid-root pkexec reads and then writes argv[1], which aliases the environment, reintroducing a stripped variable (GCONV_PATH) to gain local root. Nicknamed PwnKit (a pun on polkit), it sat unnoticed for over twelve years and affects nearly every Linux distribution.
- CVE-2021-30807high 7.82021
IOMobileFramebuffer unchecked displayed-surface index
A user-controlled displayed-framebuffer index was not checked against an inline IOSurface pointer array, so an out-of-bounds pointer could be treated as an IOSurface and used through the wrong type.
- CVE-2021-35392high 7.52021
Realtek WSC SSDP response heap overflow
A prefix-only SSDP service-type check accepts an oversized ST suffix, then an unbounded formatter writes that value twice into a 512-byte heap response.
- CVE-2021-35393critical 9.82021
Realtek WSC UPnP callback-port stack overflow
The UPnP callback parser copies an attacker-sized port substring into a ten-byte stack array without checking the substring length.
- CVE-2020-27930high 7.82020
Type 1 callothersubr negative operand-count overflow
The Type 1 CharString interpreter subtracted an attacker-supplied operand count from its operand-stack pointer and checked only the lower bound, so a negative count moved the pointer beyond the 64-entry stack.
- CVE-2020-15999critical 9.62020
FreeType Load_SBit_Png 16-bit dimension truncation heap overflow
An embedded-PNG loader narrows a 32-bit image width and height to 16 bits to size its bitmap buffer, but the untruncated 32-bit dimensions still drive the decode write, so a PNG larger than 0xFFFF overflows the heap.
- CVE-2020-11896critical 10.02020
Ripple20: Treck IP-in-IP fragment-chain heap overflow
Weak trimming reduces a packet's recorded total length without severing its fragment chain, so a later UDP copy allocates from the short scalar length but copies every linked fragment.
- CVE-2019-11043high 8.72019
PHP-FPM PATH_INFO pointer underflow
A malformed FastCGI path can make PATH_INFO shorter than the script-path adjustment, moving a derived pointer before its buffer and enabling an out-of-bounds write.
- CVE-2018-16986high 8.82018
BLEEDINGBIT: TI BLE advertising length overflow
A BLE scanner treats reserved header bits as part of the advertising length, letting a short radio packet drive an oversized copy into a caller-provided heap buffer.
- CVE-2018-15421high 7.82018
Cisco Webex RtpConfig unbounded scanset overflow
Opening a recording makes the Windows player parse a neighboring RtpConfig.ini file with two widthless sscanf scansets, allowing a token from a 0x3ff-byte input chunk to overrun 0x100-byte stack buffers.
- CVE-2018-0171critical 9.82018
Cisco Smart Install: a network TLV length becomes a stack copy count
An unauthenticated Smart Install client accepts a packet-controlled TLV length as the byte count for copying packet data into a fixed stack buffer, allowing a TCP/4786 message to overwrite the handler's stack frame.
- CVE-2018-0802high 7.82018
Equation Editor 32-byte font-name stack overflow
A font name already truncated to 256 bytes was later copied with strcpy into the 32-byte lfFaceName member of a stack LOGFONTA structure, so a crafted equation object could overflow the native stack.
- CVE-2015-3456high 7.72015
VENOM: QEMU floppy controller FIFO index escapes its buffer
One byte-at-a-time write into a fixed 512-byte device FIFO advances its index with no bound, so a guest that keeps feeding the I/O port writes attacker-controlled bytes past the buffer into host process memory.
- CVE-2015-0235critical 10.02015
GHOST hostname parser heap overflow
glibc under-allocated a resolver scratch buffer by one pointer slot, so a numeric hostname copy wrote four or eight bytes beyond the heap allocation.
- CVE-2010-2883high 9.32010
Adobe CoolType: a 28-byte SING name becomes an unbounded C string
A crafted embedded font can omit a NUL from the fixed-width SING uniqueName field and following bytes, causing CoolType.dll to scan beyond the field and append an attacker-controlled run into a stack buffer with strcat.
- CVE-2008-4250critical 10.02008
Windows Server service path-canonicalization stack overflow (MS08-067)
A crafted RPC path with more "..\" segments than real ones drives the canonicalizer's backward scan before the start of its stack buffer, corrupting the saved return address. Fun fact: shipped as MS08-067, it became the classic Metasploit ms08_067_netapi demo and the engine of the Conficker worm, which infected millions of machines in 2008 to 2009, one of the most-exploited Windows RCEs ever.