Impact
The vulnerability occurs in the ncnn framework when Net::load_param() reads a malicious .param file. The parsed parameter id is only checked against id >= NCNN_MAX_PARAM_COUNT. A negative id bypasses this check and indexes before the params[NCNN_MAX_PARAM_COUNT] array, causing an out‑of‑bounds heap write. This buffer overflow can corrupt adjacent memory, and if the application can be supplied with a crafted model file, it could lead to arbitrary code execution. The issue was fixed by commit 5a0288f255daa6c3294f77109f67718e434ec020.
Affected Systems
The affected product is Tencent ncnn, a mobile‑optimized neural network inference framework. Any build of ncnn that predates the fix commit 5a0288f255 is at risk. No specific version numbers are listed in the input, so users should consider all versions older than the commit as affected.
Risk and Exploitability
The repository lists a CVSS score of 7.1 and an EPSS score of less than 1%, indicating moderate severity but low probability of widespread exploitation. The vulnerability is not included in CISA’s KEV catalog. The attack likely requires an attacker to supply a crafted .param file to the application, so the primary vectors are local or any component that loads user‑supplied model files without trusted validation. If the application runs with elevated privileges or processes untrusted models, the risk escalates.
OpenCVE Enrichment