{"id":"CVE-2026-81334","state":"PUBLISHED","title":"darknet through 6.0 Out-of-Bounds Read and Write via Unchecked Layer Index in .cfg Parser","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.","publishedAt":"2026-08-27T14:50:41.973Z","updatedAt":"2026-08-27T19:23:22.461Z","severity":{"score":6.9,"label":"Medium","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N","source":"VulnCheck"},"assigner":"VulnCheck","products":["hank-ai darknet"],"affected":[{"vendor":"hank-ai","product":"darknet","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"6.0","versionType":"custom"}],"collectionURL":"https://github.com/hank-ai/darknet","repo":"https://github.com/hank-ai/darknet"}],"references":["https://github.com/hank-ai/darknet","https://github.com/hank-ai/darknet/blob/v6.0/src-lib/darknet_cfg.cpp","https://github.com/hank-ai/darknet/blob/v6.0/src-lib/darknet_network.cpp","https://www.vulncheck.com/advisories/darknet-through-6.0-out-of-bounds-read-and-write-via-unchecked-layer-index-in-cfg-parser"],"weaknesses":["CWE-125","CWE-787"],"ingestedAt":"2026-10-29T20:13:15.269Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/81xxx/CVE-2026-81334.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-81334","state":"PUBLISHED","datePublished":"2026-08-27T14:50:41.973Z","dateUpdated":"2026-08-27T19:23:22.461Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-08-26T17:44:26.831Z"},"containers":{"cna":{"title":"darknet through 6.0 Out-of-Bounds Read and Write via Unchecked Layer Index in .cfg Parser","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"hank-ai","product":"darknet","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"6.0","versionType":"custom"}],"collectionURL":"https://github.com/hank-ai/darknet","repo":"https://github.com/hank-ai/darknet"}],"references":[{"url":"https://github.com/hank-ai/darknet","tags":["product"]},{"url":"https://github.com/hank-ai/darknet/blob/v6.0/src-lib/darknet_cfg.cpp","tags":["technical-description"]},{"url":"https://github.com/hank-ai/darknet/blob/v6.0/src-lib/darknet_network.cpp","tags":["technical-description"]},{"url":"https://www.vulncheck.com/advisories/darknet-through-6.0-out-of-bounds-read-and-write-via-unchecked-layer-index-in-cfg-parser","name":"VulnCheck Advisory: darknet through 6.0 Out-of-Bounds Read and Write via Unchecked Layer Index in .cfg Parser","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"NONE","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"MEDIUM","baseScore":6.9,"vectorString":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"LOW","availabilityImpact":"HIGH","version":"3.1","baseSeverity":"MEDIUM","baseScore":6.1,"vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-125","lang":"en","description":"Out-of-bounds Read","type":"CWE"},{"cweId":"CWE-787","lang":"en","description":"Out-of-bounds Write","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-08-27T14:50:41.973Z"},"datePublic":"2026-08-26T00:00:00.000Z","credits":[{"lang":"en","value":"Michael Holmquist","type":"finder"}],"x_generator":{"engine":"vulncheck-endgame"},"source":{"discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-27T19:23:14.805211Z","id":"CVE-2026-81334","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-27T19:23:22.461Z"}}]}}}