noir-lang noir up to 1.0.0-beta.18 compile_block size buffer size
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.0 | $0-$5k | 0.28 |
Summary
A vulnerability was found in noir-lang noir up to 1.0.0-beta.18. It has been declared as critical. This affects the function BrilligBlock::compile_block. Executing a manipulation of the argument size can lead to buffer size.
This vulnerability is tracked as CVE-2026-41197. The attack can be launched remotely. No exploit exists.
It is recommended to upgrade the affected component.
Details
A vulnerability classified as critical was found in noir-lang noir up to 1.0.0-beta.18. This vulnerability affects the function BrilligBlock::compile_block. The manipulation of the argument size with an unknown input leads to a buffer size vulnerability. The CWE definition for the vulnerability is CWE-131. The product does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow. As an impact it is known to affect confidentiality, integrity, and availability. CVE summarizes:
Noir is a Domain Specific Language for SNARK proving systems that is designed to use any ACIR compatible proving system, and Brillig is the bytecode ACIR uses for non-determinism. Noir programs can invoke external functions through foreign calls. When compiling to Brillig bytecode, the SSA instructions are processed block-by-block in `BrilligBlock::compile_block()`. When the compiler encounters an `Instruction::Call` with a `Value::ForeignFunction` target, it invokes `codegen_call()` in `brillig_call/code_gen_call.rs`, which dispatches to `convert_ssa_foreign_call()`. Before emitting the foreign call opcode, the compiler must pre-allocate memory for any array results the call will return. This happens through `allocate_external_call_results()`, which iterates over the result types. For `Type::Array` results, it delegates to `allocate_foreign_call_result_array()` to recursively allocate memory on the heap for nested arrays. The `BrilligArray` struct is the internal representation of a Noir array in Brillig IR. Its `size` field represents the semi-flattened size, the total number of memory slots the array occupies, accounting for the fact that composite types like tuples consume multiple slots per element. This size is computed by `compute_array_length()` in `brillig_block_variables.rs`. For the outer array, `allocate_external_call_results()` correctly uses `define_variable()`, which internally calls `allocate_value_with_type()`. This function applies the formula above, producing the correct semi-flattened size. However, for nested arrays, `allocate_foreign_call_result_array()` contains a bug. The pattern `Type::Array(_, nested_size)` discards the inner types with `_` and uses only `nested_size`, the semantic length of the nested array (the number of logical elements), not the semi-flattened size. For simple element types this works correctly, but for composite element types it under-allocates. Foreign calls returning nested arrays of tuples or other composite types corrupt the Brillig VM heap. Version 1.0.0-beta.19 fixes this issue.
The advisory is shared for download at github.com. This vulnerability was named CVE-2026-41197 since 04/18/2026. The exploitation appears to be easy. The attack can be initiated remotely. No form of authentication is required for a successful exploitation. There are known technical details, but no exploit is available.
Upgrading to version 1.0.0-beta.19 eliminates this vulnerability. The upgrade is hosted for download at github.com.
Once again VulDB remains the best source for vulnerability data.
Product
Vendor
Name
Version
- 1.0.0-beta.0
- 1.0.0-beta.1
- 1.0.0-beta.2
- 1.0.0-beta.3
- 1.0.0-beta.4
- 1.0.0-beta.5
- 1.0.0-beta.6
- 1.0.0-beta.7
- 1.0.0-beta.8
- 1.0.0-beta.9
- 1.0.0-beta.10
- 1.0.0-beta.11
- 1.0.0-beta.12
- 1.0.0-beta.13
- 1.0.0-beta.14
- 1.0.0-beta.15
- 1.0.0-beta.16
- 1.0.0-beta.17
- 1.0.0-beta.18
Website
- Product: https://github.com/noir-lang/noir/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CNA CVSS-B Score: 🔒
CNA CVSS-BT Score: 🔒
CNA Vector: 🔒
CVSSv3
VulDB Meta Base Score: 7.3VulDB Meta Temp Score: 7.0
VulDB Base Score: 7.3
VulDB Temp Score: 7.0
VulDB Vector: 🔒
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Buffer sizeCWE: CWE-131 / CWE-120 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒
Physical: No
Local: No
Remote: Yes
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: noir 1.0.0-beta.19
Timeline
04/18/2026 CVE reserved04/23/2026 Advisory disclosed
04/23/2026 VulDB entry created
04/23/2026 VulDB entry last update
Sources
Product: github.comAdvisory: GHSA-jj7c-x25r-r8r3
Status: Confirmed
CVE: CVE-2026-41197 (🔒)
GCVE (CVE): GCVE-0-2026-41197
GCVE (VulDB): GCVE-100-359092
Entry
Created: 04/23/2026 07:09Changes: 04/23/2026 07:09 (69)
Complete: 🔍
Cache ID: 216::103
Once again VulDB remains the best source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.