Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft .param with negative parameter id
-
DeliveryDeliver malicious model to victim app
-
ExploitVictim calls Net::load_param()
-
ExecutionBounds check misses negative id
-
PersistOut-of-bounds heap write below params[]
-
ImpactHeap corruption, DoS or potential code execution
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
|
| Exploitation Conditions | Exploitation requires the target application to call Net::load_param() (or the binary load_param_bin path) on an attacker-controlled .param/.param.bin file whose parsed parameter id is negative - that specific malformed field IS the trigger. Limiting factors: the attacker must get the victim to load the malicious model (UI:R), the vector is local rather than remote (AV:L), and the deployment must actually accept untrusted model files, so applications that only load bundled, trusted models are not exposed. No authentication or special privileges are needed (PR:N) once the malicious file reaches the parser. |
| Impact | The supplied CVSS 3.1 vector (AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H, base 7.1) captures the profile well: the vector is local because exploitation requires the victim application to load an attacker-supplied model file (UI:R), not a remote network service. No privileges are required (PR:N) and complexity is low (AC:L) once a malicious .param is delivered. Impact is high to integrity and availability but none to confidentiality, consistent with a heap-corruption/crash primitive. No EPSS score, KEV listing, POC, or SSVC data was provided, so exploitation-probability signals are absent; realistic risk is moderate and scales entirely with whether a deployment ingests untrusted models. This is a genuine memory-safety bug but not an internet-facing, mass-exploitable one. One tension worth verifying: an OOB heap write can sometimes be escalated to code execution, which the C:N/I:H/A:H scoring does not fully capture - treat the RCE ceiling as uncertain pending exploitability research. |
| Exploit ScenarioDerived | An attacker crafts a malicious .param model file containing a negative parameter id and delivers it to a victim who loads it through an ncnn-based application (for example a mobile app or ML tool that imports third-party models). When Net::load_param() parses the file, ParamDict::load_param() writes out of bounds below the params[] array, corrupting the heap and enabling denial of service or potentially further memory-corruption exploitation. No public exploit is identified at time of analysis, and the local vector plus required user interaction constrain the attack. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 15, 2026
Out-of-bounds heap write in Tencent's ncnn neural-network inference framework allows a crafted .param model file to corrupt heap memory when parsed by Net::load_param(). Because ParamDict::load_param() and load_param_bin() validated the parsed parameter id only against the upper bound (id >= NCNN_MAX_PARAM_COUNT), a negative id indexes before the params[] array, giving an attacker a write primitive below the allocated buffer. No public exploit is identified at time of analysis and the issue is not in CISA KEV; an upstream source-code fix is available.
RemediationAI
Upstream fix available (PR/commit); released patched version not independently confirmed - apply the fix from commit 5a0288f255daa6c3294f77109f67718e434ec020 (https://github.com/Tencent/ncnn/commit/5a0288f255daa6c3294f77109f67718e434ec020), which adds a lower-bound 'id < 0' check to both load_param and load_param_bin, or upgrade to an ncnn release that includes it; consult the advisory at https://github.com/Tencent/ncnn/security/advisories/GHSA-jxmc-3mv6-7pwr for release guidance. Because no fixed release tag is provided in the input, verify the shipping version contains the patched paramdict.cpp before relying on it. As a compensating control until patched, do not load .param/.param.bin files from untrusted sources - restrict model loading to a trusted, integrity-verified pipeline (e.g. signed or checksummed model artifacts), which trades off the ability to accept arbitrary user-supplied models. If rebuilding is possible, applying the two-line diff locally is low-risk with no functional side effect on valid models.
Affected VersionsENISA
Affected Packages
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
ncnn (CPE cpe:2.3:a:tencent:ncnn) is a widely used C++ neural-network inference framework optimized for mobile/embedded deployment that consumes model definitions from .param files in both text and binary form. The root cause is CWE-20 improper input validation: in src/paramdict.cpp the parameter id read from the untrusted model file was bounds-checked only with 'id >= NCNN_MAX_PARAM_COUNT', omitting any lower-bound check. A negative id therefore passes validation and is then used to index the fixed-size params[NCNN_MAX_PARAM_COUNT] member, producing an out-of-bounds heap write at a negative offset below the array base. The fix adds 'id < 0 ||' to both the text loader (load_param) and the binary loader (load_param_bin).
Know when Ncnn 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
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
Exploitation needs a victim to load a malicious local model file, so AV:L and UI:R with PR:N; a heap-write corruption yields I:H/A:H but no disclosure, so C:N.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
ncnn is a high-performance neural network inference framework optimized for the mobile platform. In commit e54f7b1f88434e1d844ea0551b880a1cfb079ce1 and earlier, ncnn allows an out-of-bounds heap write in ncnn::ParamDict::load_param() when Net::load_param() loads a malicious .param model file because the parsed parameter id is checked only against id >= NCNN_MAX_PARAM_COUNT, allowing a negative id to index before the params[NCNN_MAX_PARAM_COUNT] array. This vulnerability is fixed by commit 5a0288f255daa6c3294f77109f67718e434ec020.
Executive ViewAI
Tencent's ncnn neural network inference library contains a heap memory corruption vulnerability triggered by maliciously crafted model files, with no public exploit identified at time of analysis. Organizations using ncnn for AI/ML inference risk system compromise and data breach through this attack vector, affecting security posture and business continuity. Immediate inventory and remediation planning are critical for systems processing external or semi-trusted model files.
No vendor-released patch identified at time of analysis; upstream source-code fix is available but requires custom compilation and testing. Interim mitigations: restrict .param model file sources to internally-controlled repositories only, implement robust file format validation before ncnn parsing, sandbox or containerize ncnn-dependent applications to limit blast radius, and disable external model loading where feasible pending patch deployment.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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 in Tencent ncnn's YUV420SP-to-RGB conversion API (ncnn::yuv420sp2rgb in src/mat_pixel.cpp) lets unauthe
Out-of-bounds reads in Tencent ncnn's MatMul layer can disclose process memory or crash inference workloads when a craft
EUVD-2026-44794
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB