Skip to main content

hank-ai Darknet CVE-2026-72852

| EUVDEUVD-2026-63536 HIGH
Integer Overflow or Wraparound (CWE-190)
2026-08-20 VulnCheck GHSA-5277-mwh4-q4cc
8.5
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft .cfg with overflow-inducing dimensions
  2. Delivery
    Deliver .cfg to target pipeline or user
  3. Exploit
    Darknet loads .cfg and computes undersized xcalloc size
  4. Execution
    Allocation returns too-small heap buffer
  5. Persist
    forward_convolutional_layer accesses beyond allocation boundary
  6. Impact
    Heap metadata corruption enabling potential code execution

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The attacker must be able to supply or influence a .cfg configuration file that the target darknet process loads. The CVSS 4.0 vector (AV:L/UI:P) confirms this is a local attack requiring passive user interaction - a user or automated pipeline must initiate loading of the file. No valid .weights file is required; the .cfg alone triggers the overflow during layer initialization. Exploitation is therefore limited to scenarios where untrusted .cfg files can reach a darknet process, such as model-sharing workflows, automated training pipelines that download community configurations, or inference services that accept user-submitted model files. Environments that exclusively load hardcoded or internally-controlled .cfg files face no realistic exploitation risk. The specific limiting factors are: (1) attacker must control or tamper with a .cfg file delivered to the target, (2) the target must invoke darknet to load that file (passive UI), and (3) the dimension product in the .cfg must be crafted to overflow 32-bit signed arithmetic - a deterministic condition requiring knowledge of the vulnerability but no brute force.

Impact

The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P, score 8.5) accurately reflects the threat model: an attacker must deliver a crafted .cfg file to a system and induce a process to load it, placing the attack vector in the local domain with passive user interaction. High VC/VI/VA impact is well-founded given that heap metadata corruption in release builds is confirmed by the POC. No EPSS score was supplied in the source intelligence, so exploitation probability cannot be quantified from base-rate data. The vulnerability is not listed in the CISA KEV catalog, meaning no confirmed mass or active exploitation has been observed. However, the existence of a working POC - demonstrating glibc allocator corruption without requiring a valid weights file - meaningfully lowers the bar for exploitation, and any environment that ingests community-sourced or externally-supplied darknet .cfg files should treat remediation as a near-term priority rather than a background task. The attack is local by CVSS vector but 'local' in the darknet context includes model-sharing workflows, training pipelines, and inference services that download and load model configurations from external sources. No CVSS vector inconsistencies are present: AV:L is consistent with the file-loading trigger described.

Exploit ScenarioDerived

An attacker crafts a darknet .cfg file specifying, for example, width=256, height=256, and filters=65536, causing the product 256*256*65536 to equal 2^32 and wrap to zero under 32-bit signed arithmetic; xcalloc then allocates a zero- or near-zero-byte heap buffer. When the operator loads this configuration for inference or training - without needing a .weights file - forward_convolutional_layer computes correct GEMM dimensions and immediately reads and writes past the undersized buffer, corrupting heap metadata. The POC referenced in GitHub issue #148 demonstrates this produces a clean glibc allocator crash in release builds, a primitive that skilled attackers may leverage for arbitrary code execution.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 20, 2026

Heap buffer overflow in hank-ai/darknet's convolutional layer initialization corrupts process memory when a crafted .cfg model configuration is loaded, because layer weight and output buffer sizes are derived from unchecked 32-bit integer multiplication of configuration-supplied fields, allowing the product to wrap to zero or a small value. Darknet versions through 6.0 are affected, and no valid .weights file is required to trigger the flaw - the .cfg alone is sufficient. A publicly available proof of concept demonstrates both an out-of-bounds read under AddressSanitizer and glibc allocator metadata corruption in a release build, confirming that exploitation does not require deep reverse engineering.

RemediationAI

No vendor-released patched version has been confirmed at time of analysis; consumers should monitor the upstream repository at https://github.com/hank-ai/darknet and the VulnCheck advisory at https://www.vulncheck.com/advisories/darknet-integer-overflow-in-convolutional-layer-buffer-sizing-leads-to-heap-buffer-overflow for patch availability. The most direct compensating control is to validate all .cfg configuration field values - specifically c, groups, n, size, out_h, out_w, and out_c - against safe maximum bounds before layer initialization, checking that no intermediate product exceeds INT_MAX; this can be applied as a patch to the upstream source at the xcalloc call sites. Pipelines that ingest externally-supplied or community-contributed .cfg files should be sandboxed (container with seccomp, or a dedicated low-privilege process) to contain the impact of any heap corruption to the inference subprocess rather than the host. The most conservative mitigation is to restrict .cfg ingestion to configurations sourced exclusively from trusted, internally-controlled repositories until a patched release is available. Building darknet with AddressSanitizer in staging environments will surface exploitation attempts at the cost of a runtime performance reduction of roughly 2x.

Affected VersionsENISA

darknet 0 ≤6.0

Affected Packages

euvd darknet no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Darknet is a C/C++ neural network framework primarily associated with YOLO-family object detection models. The affected code in src-lib/convolutional_layer.cpp computes l.nweights as (c / groups) * n * size * size and l.outputs as l.out_h * l.out_w * l.out_c using native 32-bit signed integer arithmetic before passing the result directly to xcalloc. CWE-190 (Integer Overflow or Wraparound) describes this exact pattern: when the true mathematical product exceeds INT_MAX (2,147,483,647), the signed result wraps to a small or negative value, causing xcalloc to allocate far less memory than the network forward pass requires. The root cause is compounded by an operand-order discrepancy: forward_convolutional_layer re-derives the GEMM operand k as l.size*l.size*l.c/l.groups - dividing after multiplying - whereas the allocation divided first, yielding a larger effective dimension than was allocated for. The CPE string cpe:2.3:a:hank-ai:darknet:*:*:*:*:*:*:*:* covers all releases; the vulnerable lines are confirmed at v6.0 via GitHub source references at convolutional_layer.cpp lines 764, 811, and 1457.

Know when Darknet gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.5 HIGH
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.8 HIGH

File loading requires user interaction (UI:R) but no privileges; heap corruption is scoped to the vulnerable process with no scope change (S:U).

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

hank-ai/darknet sizes a convolutional layer's weight and output heap buffers by multiplying configuration fields taken from a .cfg file in unchecked 32-bit int arithmetic. In src-lib/convolutional_layer.cpp, l.nweights is computed as (c / groups) * n * size * size and l.outputs as l.out_h * l.out_w * l.out_c, and both feed xcalloc directly. A .cfg whose true dimension product exceeds INT_MAX wraps to a small or zero value, so the allocation is undersized; for example width and height of 256 with filters of 65536 gives 2^32, which wraps to 0. forward_convolutional_layer then re-derives the GEMM dimensions with a different operand order, computing k as l.size*l.size*l.c / l.groups where the allocation divided before multiplying, and reads and writes through the undersized buffer. Loading the crafted .cfg for inference or training is sufficient and no valid .weights file is required. The reported proof of concept observed a heap buffer overflow read in gemm_nn_fast under AddressSanitizer and glibc allocator metadata corruption in a release build of the same input, indicating an out-of-bounds write.

Executive ViewAI

Why It Matters

Darknet (versions through 6.0), an open source machine learning framework used in computer vision applications, contains a critical code execution vulnerability triggered by loading malicious model configuration files without requiring authentication; publicly available exploit code exists demonstrating exploitation feasibility. Organizations using Darknet for model training or inference operations face immediate risk of system compromise, with no vendor patch currently available. Urgent action to isolate Darknet systems and restrict model file sources is required to prevent exploitation.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) cryptographic signature verification for all .cfg model configuration files from trusted sources; (2) strict execution environment isolation (containers/VMs) with minimal process privileges and network segmentation; (3) allowlisting of approved model repositories with strict input validation; (4) comprehensive audit logging of model file sources and Darknet process execution; (5) disable Darknet if not operationally required; (6) evaluation and migration to alternative, patched ML frameworks.

Threat Intelligence Overview

EPSS Score
0.1%
Top 96% exploitable
Prevalence
Low
niche ML framework, primarily YOLO research and detection deployments
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy