Horizon Alert
Summary of the vulnerability and why it matters
This vulnerability in the Noir compiler can lead to heap corruption when compiling specific types of nested array structures. This means that programs compiled with the affected versions of Noir might not behave as expected, potentially causing application instability or unexpected outcomes. Teams should pay attention because the corruption occurs during the compilation phase, potentially impacting the integrity of generated code.
- Corrupts memory when compiling arrays.
- Can affect programs using complex data types.
- Impacts code generation integrity.
Attack Path
How an attacker could exploit the issue
An attacker could exploit this vulnerability by crafting malicious Noir code that, when compiled, causes the Noir compiler to allocate insufficient memory for nested array results. This leads to heap corruption within the Brillig VM, potentially allowing an attacker to control program execution or leak sensitive data during the execution of compiled Noir programs. This requires the attacker to control the Noir source code being compiled.
- Attacker controls source code.
- Compilation process is vulnerable.
- Heap corruption on VM execution.
Live Threat
Current exploitation, exposure, and threat context
This vulnerability, residing in a compiler for cryptographic proving systems, is unlikely to be directly weaponized by attackers in the wild. Exploitation requires deep understanding of the compiler's internal workings and execution within a development or build environment, rather than through a public-facing attack vector.
- Primarily affects build process.
- No observed exploitation activity.
- Fix is available in a specific beta release.
Priority actions
Operational Fix
Recommended remediation, mitigation, and detection steps
Prioritize patching Noir to version 1.0.0-beta.19 to address heap corruption in the Brillig VM during compilation of nested arrays. If patching is not immediately feasible, implement strict input validation for foreign calls returning complex array types and enhance monitoring for unusual memory allocation patterns or VM crashes.
- Patch Noir to v1.0.0-beta.19.
- Monitor for heap corruption and VM crashes.
- Validate foreign call array return types.