CyberSecBulletin

Improper Validation of Array Index

CWE-129

The product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index references a valid position within the array.

We track 265 vulnerabilities of this type. 100% are rated high or critical, and the average CVSS score is 8.0. 1 has been exploited in real attacks.

How this weakness is prevented

  • Architecture and Design: Use an input validation framework such as Struts or the OWASP ESAPI Validation API. Note that using a framework does not automatically address all input validation problems; be mindful of weaknesses that could arise from misusing the framework itself (CWE-1173).
  • Requirements: Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, Ada allows the programmer to constrain the values of a variable and languages such as Java and Ruby will allow the programmer to handle exceptions when an out-of-bounds index is accessed.
  • Operation: Use a CPU and operating system that offers Data Execution Protection (using hardware NX or XD bits) or the equivalent techniques that simulate this feature in software, such as PaX. These techniques ensure that any instruction executed is exclusively at a memory address that is part of the code segment. For more information on these techniques see D3-PSEP (Process Segment Execution Prevention) from D3FEND.
  • Implementation: Be especially careful to validate all input when invoking code that crosses language boundaries, such as from an interpreted language to native code. This could create an unexpected interaction between the language boundaries. Ensure that you are not violating any of the expectations of the language with which you are interfacing. For example, even though Java may not be susceptible to buffer overflows, providing a large argument in a call to native code might trigger an overflow.
  • Architecture and Design Operation: Run your code using the lowest privileges that are required to accomplish the necessary tasks. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.

Latest Improper Validation of Array Index vulnerabilities

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-38697Linux

    In the Linux kernel, the following vulnerability has been resolved: jfs: upper bound check of tree index in dbAllocAG When computing the tree index in dbAllocAG, we never check if we are out of bounds realative to the size of the stree. This could happen in a

  • 9.8 Critical severity

    Cjson: Out-of-bounds Read

    CVE-2025-57052DaveGamble

    cJSON 1.5.0 through 1.7.18 allows out-of-bounds access via the decode_array_index_from_pointer function in cJSON_Utils.c, allowing remote attackers to bypass array bounds checking and access restricted data via malformed JSON pointer strings containing alphanu

  • 7.1 High severity

    GPU Display Drivers: Improper Validation of Array Index

    CVE-2025-23278NVIDIA

    NVIDIA Display Driver for Windows and Linux contains a vulnerability where an attacker might cause an improper index validation by issuing a call with crafted parameters. A successful exploit of this vulnerability might lead to data tampering or denial of serv

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-38367Linux

    In the Linux kernel, the following vulnerability has been resolved: LoongArch: KVM: Avoid overflow with array index The variable index is modified and reused as array index when modify register EIOINTC_ENABLE. There will be array index overflow problem.

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-38239Linux

    In the Linux kernel, the following vulnerability has been resolved: scsi: megaraid_sas: Fix invalid node index On a system with DRAM interleave enabled, out-of-bound access is detected: megaraid_sas 0000:3f:00.0: requested/available msix 128/128 poll_queue 0 -

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-38198Linux

    In the Linux kernel, the following vulnerability has been resolved: fbcon: Make sure modelist not set on unregistered console It looks like attempting to write to the "store_modes" sysfs node will run afoul of unregistered consoles: UBSAN: array-index-out-of-b

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-38146Linux

    In the Linux kernel, the following vulnerability has been resolved: net: openvswitch: Fix the dead loop of MPLS parse The unexpected MPLS packet may not end with the bottom label stack. When there are many stacks, The label count value has wrapped around. A de

  • 7.5 High severity

    Apache Guacamole: Improper Validation of Array Index

    CVE-2024-35164Apache

    The terminal emulator of Apache Guacamole 1.5.5 and older does not properly validate console codes received from servers via text-based protocols like SSH. If a malicious user has access to a text-based connection, a specially-crafted sequence of console codes

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2022-50066Linux

    In the Linux kernel, the following vulnerability has been resolved: net: atlantic: fix aq_vec index out of range error The final update statement of the for loop exceeds the array range, the dereference of self->aq_vec[i] is not checked and then leads to the i

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-38013Linux

    In the Linux kernel, the following vulnerability has been resolved: wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request Make sure that n_channels is set after allocating the struct cfg80211_registered_device::int_scan_req member. Seen

  • 9.8 Critical severity

    RT-Thread: Improper Validation of Array Index

    CVE-2025-5868RT-ThreadEPSS 1.15%

    A vulnerability, which was classified as critical, has been found in RT-Thread 5.1.0. This issue affects the function sys_thread_sigprocmask of the file rt-thread/components/lwp/lwp_syscall.c. The manipulation of the argument how leads to improper validation o

  • 9.8 Critical severity

    RT-Thread: Improper Validation of Array Index

    CVE-2025-5866RT-Thread

    A vulnerability classified as critical has been found in RT-Thread 5.1.0. This affects the function sys_sigprocmask of the file rt-thread/components/lwp/lwp_syscall.c. The manipulation of the argument how leads to improper validation of array index.

  • 9.8 Critical severity

    Tivoli Monitoring: Improper Validation of Array Index

    CVE-2025-3357IBMEPSS 1.1%

    IBM Tivoli Monitoring 6.3.0.7 through 6.3.0.7 Service Pack 19 could allow a remote attacker to execute arbitrary code due to improper validation of an index value of a dynamically allocated array.

  • 7.5 High severity

    fiber: Improper Validation of Array Index

    CVE-2025-48075Gofiber

    Fiber is an Express-inspired web framework written in Go. Starting in version 2.52.6 and prior to version 2.52.7, `fiber.Ctx.BodyParser` can map flat data to nested slices using `key[idx]value` syntax, but when idx is negative, it causes a panic instead of ret

  • 7.5 High severity

    ollama/ollama: Improper Validation of Array Index

    CVE-2025-1975Ollama

    A vulnerability in the Ollama server version 0.5.11 allows a malicious user to cause a Denial of Service (DoS) attack by customizing the manifest content and spoofing a service. This is due to improper validation of array index access when downloading a model

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-37752Linux

    In the Linux kernel, the following vulnerability has been resolved: net_sched: sch_sfq: move the limit validation It is not sufficient to directly validate the limit on the data that the user passes as it can be updated based on how the other parameters are ch

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-40114Linux

    In the Linux kernel, the following vulnerability has been resolved: iio: light: Add check for array bounds in veml6075_read_int_time_ms The array contains only 5 elements, but the index calculated by veml6075_read_int_time_index can range from 0 to 7, which co

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-40014Linux

    In the Linux kernel, the following vulnerability has been resolved: objtool, spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq() If speed_hz < AMD_SPI_MIN_HZ, amd_set_spi_freq() iterates over the entire amd_spi_freq array without breaking out early,

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-22067Linux

    In the Linux kernel, the following vulnerability has been resolved: spi: cadence: Fix out-of-bounds array access in cdns_mrvl_xspi_setup_clock() If requested_clk > 128, cdns_mrvl_xspi_setup_clock() iterates over the entire cdns_mrvl_xspi_clk_div_list array wit

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-21991Linux

    In the Linux kernel, the following vulnerability has been resolved: x86/microcode/AMD: Fix out-of-bounds on systems with CPU-less NUMA nodes Currently, load_microcode_amd() iterates over all NUMA nodes, retrieves their CPU masks and unconditionally accesses pe

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2023-53019Linux

    In the Linux kernel, the following vulnerability has been resolved: net: mdio: validate parameter addr in mdiobus_get_phy() The caller may pass any value as addr, what may result in an out-of-bounds access to array mdio_map. One existing case is stmmac_init_ph

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2023-53000Linux

    In the Linux kernel, the following vulnerability has been resolved: netlink: prevent potential spectre v1 gadgets Most netlink attributes are parsed and validated from __nla_validate_parse() or validate_nla() u16 type = nla_type(nla); if (type == 0 || type > m

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2023-52988Linux

    In the Linux kernel, the following vulnerability has been resolved: ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path() snd_hda_get_connections() can return a negative error code. It may lead to accessing 'conn' array at a negative index

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2023-52987Linux

    In the Linux kernel, the following vulnerability has been resolved: ASoC: SOF: ipc4-mtrace: prevent underflow in sof_ipc4_priority_mask_dfs_write() The "id" comes from the user. Change the type to unsigned to prevent an array underflow.

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2022-49720Linux

    In the Linux kernel, the following vulnerability has been resolved: block: Fix handling of offline queues in blk_mq_alloc_request_hctx() This patch prevents that test nvme/004 triggers the following: UBSAN: array-index-out-of-bounds in block/blk-mq.h:135:9 ind

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2022-49548Linux

    In the Linux kernel, the following vulnerability has been resolved: bpf: Fix potential array overflow in bpf_trampoline_get_progs() The cnt value in the 'cnt >= BPF_MAX_TRAMP_PROGS' check does not include BPF_TRAMP_MODIFY_RETURN bpf programs, so the number of

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2022-49478Linux

    In the Linux kernel, the following vulnerability has been resolved: media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init Syzbot reported that -1 is used as array index. The problem was in missing validation check. hdw->unit_number is initialized

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2022-49471Linux

    In the Linux kernel, the following vulnerability has been resolved: rtw89: cfo: check mac_id to avoid out-of-bounds Somehow, hardware reports incorrect mac_id and pollute memory. Check index before we access the array. UBSAN: array-index-out-of-bounds in rtw89

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2022-49186Linux

    In the Linux kernel, the following vulnerability has been resolved: clk: visconti: prevent array overflow in visconti_clk_register_gates() This code was using -1 to represent that there was no reset function. Unfortunately, the -1 was stored in u8 so the if (c

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2022-49170Linux

    In the Linux kernel, the following vulnerability has been resolved: f2fs: fix to do sanity check on curseg->alloc_type As Wenqing Liu reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=215657 - Overview UBSAN: array-index-out-of-bounds in fs/f2f

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-21692Linux

    In the Linux kernel, the following vulnerability has been resolved: net: sched: fix ets qdisc OOB Indexing Haowei Yan <[email protected]> found that ets_class_from_arg() can index an Out-Of-Bound class in ets_class_from_arg() when passed clid of 0. The ove

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2025-21680Linux

    In the Linux kernel, the following vulnerability has been resolved: pktgen: Avoid out-of-bounds access in get_imix_entries Passing a sufficient amount of imix entries leads to invalid access to the pkt_dev->imix_entries array because of the incorrect boundary

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2024-56616Linux

    In the Linux kernel, the following vulnerability has been resolved: drm/dp_mst: Fix MST sideband message body length check Fix the MST sideband message body length check, which must be at least 1 byte accounting for the message body CRC (aka message data CRC)

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2024-56608Linux

    In the Linux kernel, the following vulnerability has been resolved: drm/amd/display: Fix out-of-bounds access in 'dcn21_link_encoder_create' An issue was identified in the dcn21_link_encoder_create function where an out-of-bounds access could occur when the hp

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2024-56598Linux

    In the Linux kernel, the following vulnerability has been resolved: jfs: array-index-out-of-bounds fix in dtReadFirst The value of stbl can be sometimes out of bounds due to a bad filesystem. Added a check with appopriate return of error code in that case.

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2024-56596Linux

    In the Linux kernel, the following vulnerability has been resolved: jfs: fix array-index-out-of-bounds in jfs_readdir The stbl might contain some invalid values. Added a check to return error code in that case.

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2024-56595Linux

    In the Linux kernel, the following vulnerability has been resolved: jfs: add a check to prevent array-index-out-of-bounds in dbAdjTree When the value of lp is 0 at the beginning of the for loop, it will become negative in the next assignment and we should bail

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2024-53228Linux

    In the Linux kernel, the following vulnerability has been resolved: riscv: kvm: Fix out-of-bounds array access In kvm_riscv_vcpu_sbi_init() the entry->ext_idx can contain an out-of-bound index. This is used as a special marker for the base extensions, that can

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2024-53214Linux

    In the Linux kernel, the following vulnerability has been resolved: vfio/pci: Properly hide first-in-list PCIe extended capability There are cases where a PCIe extended capability should be hidden from the user. For example, an unknown capability (i.e., capabi

  • 7.8 High severity

    Linux: Improper Validation of Array Index

    CVE-2024-53203Linux

    In the Linux kernel, the following vulnerability has been resolved: usb: typec: fix potential array underflow in ucsi_ccg_sync_control() The "command" variable can be controlled by the user via debugfs. The worry is that if con_index is zero then "&uc->ucsi->c