Sceawere

Vulnerability Detail

CVE-2026-81334UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV

Darknet Out-of-Bounds Memory Corruption

Vulnerability Metadata

Severity
Medium
Score / CVSS
6.1
Creation Date
1h ago
Vendor
hank-ai
Product
darknet
Attack Type
Out-of-bounds Read
Vector String
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H
Attack Complexity
LOW

Narrative and Response

Description

darknet subscripts its layer array with an index taken from a configuration file without checking it against the array's length. The array is allocated in src-lib/darknet_network.cpp as xcalloc(net.n, sizeof(Darknet::Layer)), sized to exactly the number of layer sections the file declares. The shortcut, scale_channels and sam sections supply that index through their from field and the route section through its layers field, and parse_shortcut_section in src-lib/darknet_cfg.cpp reads net.layers[index].outputs with no bounds check, which reads past the allocation. The dispatch loop in create_network then reuses the same index to assign net.layers[l.index].use_bin_output and net.layers[l.index].keep_delta_gpu, writing past the allocation at an offset the file controls, with a fixed one-byte value. Parsing a crafted configuration file is sufficient: the parse runs before any weights file is opened and needs no non-default option, so the result is a reliable crash and a write whose location, though not its value, is chosen by whoever supplied the file.

Executive Summary

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Executive Summary Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Technical Details

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Detailed Technical Analysis Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Mitigations

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Remediation & Mitigations Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

References

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Intelligence References Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Additional Metadata

{
  "score": "6.1",
  "pubDate": "2026-08-27T17:20:53.683Z",
  "pubdate": "2026-08-27T17:20:53.683Z",
  "executiveSummary": "This vulnerability is an out-of-bounds (OOB) memory corruption flaw within the Darknet framework's configuration parsing logic. It manifests as both an out-of-bounds read and a subsequent out-of-bounds write, triggered by maliciously crafted configuration files.\nThe vulnerability occurs because the framework fails to perform adequate bounds checking on layer indices specified within configuration sections—specifically shortcut, scale_channels, sam, and route layers—against the network's allocated layer array. By manipulating these indices, an attacker can influence the program's memory access pattern during initialization.\nSuccessful exploitation results in a reliable process crash (denial of service) or potential memory corruption. Because the write location is controllable by the attacker via the configuration file, there is a risk of unauthorized memory modification, which could potentially be leveraged for arbitrary code execution depending on the heap layout and the data being overwritten.\nThe vulnerability is exploitable without authentication, requiring only that the application processes a attacker-supplied configuration file. It affects the core network parsing logic in Darknet, representing a high risk to systems utilizing this framework for neural network deployment.",
  "technicalDetails": "The root cause of this vulnerability lies in an improper validation of array indices within the Darknet configuration parsing pipeline. The memory for the network layers is allocated in src-lib/darknet_network.cpp using xcalloc(net.n, sizeof(Darknet::Layer)), where net.n corresponds strictly to the number of layer sections defined in the configuration file. However, subsequent parsing logic in src-lib/darknet_cfg.cpp fails to verify that indices provided in specific layer types—namely shortcut, scale_channels, sam, and route—fall within the valid [0, net.n - 1] range.\nThe attack flow begins when the Darknet parser processes a configuration file containing an index value in the 'from' or 'layers' fields that exceeds the total count of layers defined. During the execution of parse_shortcut_section, the application attempts to access net.layers[index].outputs without verifying if the index is within the bounds of the heap-allocated array. This results in an out-of-bounds read, accessing memory adjacent to the layer structure array.\nThe vulnerability escalates during the dispatch loop in create_network. The application reuses the untrusted, out-of-bounds index to perform write operations, specifically assigning values to net.layers[l.index].use_bin_output and net.layers[l.index].keep_delta_gpu. Because the index is taken directly from the configuration file, the attacker gains the ability to dictate the offset from the base of the layer array where these one-byte assignments occur. While the value written is fixed, the ability to control the destination address allows for arbitrary corruption of adjacent heap memory.\nThe exploitation is highly reliable because the vulnerability manifests during the network initialization phase, which occurs before any weights file is loaded. This bypasses typical operational constraints, as the corruption occurs early in the lifecycle of the application process. An attacker can use this primitive to corrupt function pointers, data structures, or control flow metadata stored in the heap, leading to a controlled crash or potentially steering execution flow to attacker-controlled instructions. The impact is significant, as it transforms a simple parsing task into a memory corruption vector that requires no specialized privileges or network interaction beyond the ability to provide a configuration file to the application."
}
CVE-2026-81334: Darknet Out-of-Bounds Memory Corruption (MEDIUM Severity, CVSS: 6.1) - Sceawere