Junglewise Threat Intelligence

CVE-2026-81334: Darknet array index out-of-bounds in layer configuration

CVE-2026-81334 · Severity: medium · CVSS 6.1 · Published 2026-08-27

Executive brief

Darknet is an object detection framework that loads neural network configurations from text files. A malicious configuration file can cause out-of-bounds memory access by specifying invalid layer indices, leading to application crashes and potentially allowing controlled memory writes in predictable locations. No authentication or special network access is required—simply parsing a crafted configuration file triggers the vulnerability.

Technical details

The vulnerability is a classic array index out-of-bounds (CWE-125 read, CWE-787 write). In darknet_cfg.cpp, the parse_shortcut_section and route parsing functions read the `from` and `layers` fields from configuration sections without bounds-checking them against the allocated layer array size. The layer array is allocated in darknet_network.cpp with size equal to the declared number of layers. Subsequently, these unchecked indices are used both to read `net.layers[index].outputs` and to write `net.layers[index].use_bin_output` and `net.layers[index].keep_delta_gpu` in the create_network dispatch loop. The attack vector is local (configuration file parsing) with no preconditions—the vulnerability triggers during initial parse before any weights file is opened. An attacker controlling the configuration file can cause reliable crashes and write a fixed one-byte value to memory at an attacker-chosen offset.

Affected products

  • hank-ai Darknet v6.0 and likely other versions

Timeline

  • 2026-08-27: disclosed

References

Related threats