A value parsed by std::stoi()/std::stol()/std::stoll() with base 16 is used as an array or container index without validating the parsed characters with std::isxdigit. Base-16 std::stoi() accepts a leading '-' sign and throws std::invalid_argument on non-hex characters, so attacker-controlled text shaped like "<0xXX>" but containing a sign or non-hex charact
Rule Explorer
Search the public rule index by CVE, GHSA, CWE, language, framework, author, or rule slug. Filter by language, framework, severity, confidence, license, and validation status.
- Public rules
- 6960
- Downloads
- 14.1M
- Verified
- 6960
- Authors
- 2
File-controlled data is copied into the fixed-size buffer $BUF using the unchecked byte count $N * $W before any bounds validation: the only guard (`$N * $W > sizeof($BUF) || $N * $W < 1`) runs AFTER the copy has already overflowed the buffer, and its signed long multiplication can itself overflow and pass. Validate the length before reading, with overflow-s
A sun.misc.Unsafe access is performed at a raw address computed as a buffer position plus a signed, decode-derived offset ($CTRL) without first checking that position + offset stays inside the valid region of the array. Crafted compressed input can drive the offset far negative (LZF back-reference offsets reach -8192), so Unsafe reads unrelated JVM heap memo
$FUNC copies the decoded length *$LEN from the receive buffer into caller-supplied storage *$BUFP with memcpy, but never compares the decoded length with the caller-declared capacity parameter $MAXSIZE. A malicious peer can declare a length larger than the caller's buffer (for example a file handle or opaque field longer than the protocol maximum) and the co
A frame/message length decoded from the wire ($LEN) is used as the extent of a buffer write/advance without a runtime bounds check: either it is consumed with no validation at all (parser side), or the only enforcement is ASSERT(...), which is compiled out of release builds (NDEBUG). A peer-supplied length larger than the receive buffer makes the masked writ
A message length decoded from network byte order is used without any runtime bound/equality check (only ASSERT()-style checks, which are compiled out in release builds) to compute a memmove()/memcpy() destination by backward pointer arithmetic ($BASE - $LEN ...). An attacker-chosen length moves the destination up to 64 KiB before the start of the heap buffer
A rebuilt slice ($T) is sized from $CAP, which was parsed from the LAST element of $ROW.$CELLS in document order rather than from the maximum reference in the collection. If $ROW.$CELLS comes from parsed, attacker-controlled input whose elements are not guaranteed to be in ascending order, an element appearing earlier can carry a larger reference than the la
The CCITT fax decompressor is constructed with the full frame width. Fax decoding writes exactly one scanline of the constructed width into the caller's destination buffer for every row; when this decompressor is used on a tiled TIFF whose destination buffer is sized from TileWidth (TileWidth < ImageWidth), each decoded row overshoots the tile row stride and
A decoded CCITT / Modified Huffman run length ($READER.$RUN) is passed as the bit count to an unchecked bit writer ($WRITER.WriteBits) without first verifying that it fits the remaining row width. Runs decoded from an untrusted TIFF bitstream are attacker-controlled: chained makeup codes expand a few input bits into up to 2560 pixels and the reader never cap
Bulk read of $LEN bytes from $STREAM into the backing buffer of $BUF without validating that $LEN matches the size allocated for $BUF ($BUF.size() * $BUF.item_size()). When $LEN is parsed from the file being deserialized, the read writes past the end of the heap allocation (heap-based buffer overflow). Validate the payload length against the destination allo
Multi-frame image handler seek() re-parses the frame through an explicit format parser ($PARSER._open(self), e.g. PcxImageFile._open, TiffImageFile._open, JpegImageFile._open) or reassigns the frame's logical geometry directly (self._mode/self._size/self.mode/self.size, including the tuple unpack '_, self._mode, _, self.tile = self.layers[layer - 1]') withou
An array element is stored through a post-incremented index (or a persistent stack depth is advanced) before the capacity of the target array is validated, and the validation uses `>` (or `==` on the pre-incremented value) instead of `>=`, so the index is permitted to reach the array length. When the index already equals the array length, the store lands one
A native (JNI) compress/uncompress entry point is invoked with an explicit byte offset/length into the source and an output region whose capacity was never validated before the call. The native layer reads and writes through raw pointers without bounds checks, so an input range outside the source buffer, or a destination smaller than the required compressed/
Fault-tolerant log replay copies attacker-controlled bytes into the single-sector staging slot at $MEDIA->fx_media_memory_buffer at offset $OFF for $LEN bytes, but the only bounds check compares copy_offset+copy_size against the whole multi-sector media cache ($MEDIA->fx_media_memory_size) instead of the capacity of the staging slot ($MEDIA->fx_media_bytes_p
Decompressed output is written through a raw native pointer ($IMPL.rawUncompress) that performs no bounds checking. The caller-supplied destination buffer ($OUT) and byte offset ($OUT_OFF) are passed to JNI after only null checks, and the destination capacity is never compared against the uncompressed size declared in the compressed stream. Attacker-controll
Memory was allocated using the actual bytes read ($READ), but memcpy copies the requested size ($SIZE). When fewer bytes are read than requested, this results in an out-of-bounds memory write and exposes uninitialized memory.
Potential out-of-bounds write: index `$J` bounded by `$J < $MAX` in the loop condition can reach `$MAX`, causing subsequent unconditional writes to `$DST[$J++]` or `$DST[$J + $OFFSET]` to overflow the buffer.
Loop condition allows index to reach buffer capacity before null-terminating at that index, causing an off-by-one buffer overflow write.
A signed length variable derived from packet or stream decoding is validated only with an upper-bound check before being passed to `memcpy`. If the declared length is negative, signed arithmetic checks (such as `$Q + $NRQD <= $MAX`) will evaluate to true, causing `memcpy` to cast the negative value to a large unsigned `size_t` and corrupt memory. Explicitly
Dynamic array capacity reallocation checks against full size without accounting for the terminating NULL pointer, leading to a heap out-of-bounds write.
Missing buffer capacity validation when decoding byte array data or setting length can lead to out-of-bounds writes.
Unchecked response size copied into destination buffer in stream read implementation. Ensure the response length is validated to not exceed the requested buffer capacity (cb) before calling CopyMemory or memcpy.
The loop bound $NUM is stored in an unsigned integer ($UNUM) even though $FUNC() may signal failure with a negative error return (e.g. -1). The negative value is truncated/wrapped to a huge unsigned count (for uint8_t, -1 becomes 255), so the loop iterates far past the end of the buffer that the parser filled, causing an out-of-bounds read (and transmission)
A pointer to $BUF[$IDX] is taken with a post-incrementing index while a variable-length message stream is parsed, and $IDX is never compared against the capacity of $BUF anywhere in that loop. Input carrying more elements than the fixed-size destination array holds writes past the end of the buffer with attacker-controlled content (linear stack/heap overflow