Browse / AI Framework and Platform Flaws
AI Framework and Platform Flaws
Classic software bugs in the libraries and platforms that run AI: memory corruption, traversal, SSRF, auth. 1,542 records. Reference: CWE.
- Denial of service 377
- Authentication and access control 256
- Path traversal and file access 192
- Memory corruption 159
- Code and command execution 133
- Server-side request forgery 103
- Information exposure 78
- Sandbox escape 76
- Cross-site scripting 68
- Other weaknesses 46
- SQL and query injection 22
- Real-world incidents 10
- Cross-site request forgery 8
- Unsafe deserialisation 8
- Data exfiltration 6
- `SparseFillEmptyRows` heap OOB SparseFillEmptyRows does not check that indices and values have matching sizes, so mismatched inputs cause an out-of-bounds heap read.
- Reference binding to `nullptr` in `tf.ragged.cross` Shape inference for a ragged cross op binds a reference to null, causing undefined behaviour and a crash on crafted input.
- Null pointer exception in `DeserializeSparse` A scalar input to DeserializeSparse makes shape inference dereference a null pointer and crash TensorFlow.
- Overflow/crash in `tf.range` Integer overflow from a double-typed conditional in the range and sparse eye kernels produces a crash with large inputs.
- Prototype Pollution in vm2 Prototype pollution inside vm2 lets sandboxed code escape its boundary and run arbitrary code on the host.
- NLTK Vulnerable to REDoS A regular expression in a corpus reader backtracks catastrophically on crafted input, consuming excessive CPU.
- `CHECK`-fail in `MapStage` An empty key tensor passed to tf.raw_ops.MapStage triggers a CHECK failure that aborts the process because the input is not validated.
- `std::abort` raised from `TensorListReserve` A negative num_elements passed to tf.raw_ops.TensorListReserve makes a std::vector resize to a negative size, aborting the process.
- Heap OOB and CHECK fail in `ResourceGather` An excessive batch_dims value makes ResourceGather read past the tensor's heap buffer because its rank check is only a debug check.
- FPE in `tf.raw_ops.UnravelIndex` A missing check for empty dimension tensors lets a crafted call to an index-unravelling op trigger division by zero and crash serving applications.
- Use after free and segfault in shape inference functions Shape and type data attached to shape-inference output references memory owned by a context that is freed early, so later access causes a use-after-free and segfault.
- Use of unitialized value in TFLite Quantized TFLite operations read quantization parameters without checking the quantization type, so they can use uninitialized pointers.
- Reference binding to nullptr in `RaggedTensorToSparse` A ragged-tensor op accepts a splits array without checking ordering, binding a reference to null and causing undefined behaviour.
- Heap OOB in `SdcaOptimizerV2` Illegal tensor arguments to an SDCA optimizer op skip a length check, letting the kernel read past the end of a heap buffer.
- Reference binding to nullptr in `MatrixDiagV*` ops Passing an empty tensor as the k argument to MatrixDiagV ops makes the kernel read the first element of nothing, causing undefined behaviour.
- Null pointer dereference in `UncompressElement` UncompressElement accepts a variant that does not hold a compressed element, so a null pointer is dereferenced during decompression.
- Reference binding to nullptr in `MatrixSetDiagV*` ops An empty tensor passed as the diagonal offset makes code read its first element through a null reference, causing undefined behaviour.
- Heap OOB in `ResourceScatterUpdate` A weak divisibility check on the shapes of indices and updates in ResourceScatterUpdate allows an out-of-bounds heap read.
- Incomplete validation in `MaxPoolGrad` Missing checks on the orig_input and orig_output tensors in MaxPoolGrad let a crafted call segfault the TensorFlow process.
- NPE in TFLite The TFLite SVDF kernel dereferences a state tensor pointer that may be null, crashing when the variable input lookup fails.
- Integer division by 0 in sparse reshaping A zero-element shape passed to SparseReshape causes an integer division by zero in the reshape functor.
- Heap OOB in `UpperBound` and `LowerBound` Crafted illegal arguments to UpperBound and LowerBound cause heap reads past the buffer because the rank of sorted_input is never validated.
- Division by 0 in most convolution operators A convolution call with zero-sized tensors reaches shape inference, which divides by zero and crashes the process, causing denial of service.
- Heap OOB in `RaggedGather` Crafted ragged tensor arguments make RaggedGather read a tensor's first dimension before checking its rank, causing an out-of-bounds heap read.
- Integer overflow due to conversion to unsigned A negative axis value is converted to unsigned and used as an allocation size in QuantizeAndDequantizeV4Grad, causing integer overflow in memory handling.
- Heap OOB in TFLite The expand-dims kernel does not check the lower bound of a negative axis, so a large negative value causes a read one element before the array start.
- Null pointer dereference in `SparseTensorSliceDataset` A sparse tensor built with empty indices but non-empty values causes a null pointer dereference during validation, crashing the process.
- Null pointer dereference in `CompressElement` Passing an empty component list to the element compression op dereferences a null buffer before validation, crashing the process.
- Division by zero in TFLite A crafted model file with a zero filter dimension makes a fully connected TFLite kernel divide by zero, crashing the process.
- Heap out of bounds access in sparse reduction operations Sparse reduction operations do not check group sizes or index bounds, so crafted sparse tensors cause heap out-of-bounds reads.
- Division by 0 in `ResourceScatterDiv` A zero update value passed to the scatter-divide op causes a division by zero because the shared binary-op path has no special case for it.
- Division by 0 in inplace operations An empty-input check uses OR instead of AND, so crafted arguments reach a division by zero in the inplace operation and crash it.
- Segfault on strings tensors with mistmatched dimensions, due to Go code A garbage-collection finaliser frees string tensor data whose encoding previously failed, so it dereferences invalid memory and crashes.
- Reference binding to nullptr in boosted trees Malformed empty or mismatched tensor inputs to boosted-trees ops are not validated, so a reference is bound to null, causing undefined behaviour.
- Segfault and heap buffer overflow in `{Experimental,}DatasetToTFRecord` Dataset-to-TFRecord ops assume every record is a string without checking, so numeric records cause a heap overflow and crash.
- Null pointer dereference in `MatrixDiagPartOp` A missing check on the padding_value tensor leads to reading the first element of an empty buffer, causing a null dereference.
- Incomplete validation in `QuantizeV2` Missing shape checks in the quantization op let mismatched range tensors cause out-of-bounds heap reads and null reference access.
- Heap OOB in nested `tf.map_fn` with `RaggedTensor`s Missing inner shape checks when converting variant tensors to ragged tensors leave output buffers filled with uninitialised heap data.
- Crash caused by integer conversion to unsigned A negative stream count passed to the quantile resource is converted to an unsigned value, causing an enormous reservation and a crash.
- Null pointer dereference and heap OOB read in operations restoring tensors Restore ops given an empty or short tensor name list index past the end of a heap buffer or dereference a null pointer, causing out-of-bounds reads.
- Bad alloc in `StringNGrams` caused by integer conversion Negative ngram widths passed to StringNGrams convert to huge unsigned sizes, causing an oversized memory allocation that fails.
- Floating point exception in `SparseDenseCwiseDiv` The sparse-dense division kernel does not handle a zero divisor, so a floating point exception crashes the process.
- Heap buffer overflow in `FractionalAvgPoolGrad` An empty input tensor is not validated in the fractional average pooling gradient, so the kernel reads and writes outside its allocated buffers.
- Null pointer dereference in `RaggedTensorToTensor` Passing an empty row partition types list to RaggedTensorToTensor makes the kernel dereference a null pointer, crashing the process.
- Heap OOB in TFLite's `Gather*` implementations Gather operations accept negative index values without checking, so a crafted model makes the interpreter read out-of-bounds heap memory.
- Use after free in boosted trees creation A resource freed after failed initialisation is freed again during cleanup because refcounting and smart-pointer handling disagree, causing a use after free.
- Infinite loop in TFLite A crafted model with ellipsis strided-slice parameters makes the loop counter fail to advance, so the TFLite kernel loops forever.
- Reference binding to nullptr and heap OOB in binary cwise ops Binary elementwise gradient ops skip a size check on mismatched inputs, so a reference binds to null and reads past the heap buffer.
- FPE in TFLite pooling operations TFLite pooling kernels divide by a dimension without a zero check, so crafted inputs trigger a floating point exception that crashes the process.
- Missing validation in shape inference for `Dequantize` Unvalidated axis values in Dequantize shape inference select an invalid rank, causing a segfault when arguments are malformed.