CVE-2026-3387: 
Homebrew vulnerability analysis and mitigation

Overview

CVE-2026-3387 is a NULL Pointer Dereference vulnerability in the Wren scripting language (wren-lang/wren) affecting all versions up to and including 0.4.0. The flaw resides in the getByteCountForArguments function within src/vm/wren_compiler.c and is triggered during compilation of specially crafted Wren scripts containing for loops (particularly nested loops or loops within class methods). It was reported via a GitHub issue on January 22, 2026, and publicly disclosed around March 1, 2026. The vulnerability carries a CVSS v3.1 base score of 5.5 (Medium) (Red Hat CVE, Wren Issue #1220).

Technical details

The root cause is classified as CWE-476 (NULL Pointer Dereference) and CWE-404 (Improper Resource Shutdown or Release). During compilation of a for loop, the call chain forStatement → endLoop → getByteCountForArguments (at wren_compiler.c:2961) attempts to access a struct member — likely a Compiler* or Signature* — at an offset of 0x5c8 from a NULL base pointer. This occurs when the compiler state is corrupted, such as inside a malformed class definition or deeply nested loop structure, causing a segmentation fault. The attack vector is local, requires low privileges, and no user interaction; a proof-of-concept reproducer script and harness code have been publicly disclosed (Wren Issue #1220, PoC Repro).

Impact

Successful exploitation causes a denial of service (DoS) via application crash (segmentation fault) in any process that interprets attacker-controlled Wren scripts. There is no impact on confidentiality or integrity — only availability is affected. Applications embedding the Wren VM that process untrusted script input are at risk of being crashed by a local or script-supplying attacker (Wren Issue #1220, Red Hat CVE).

Exploitability

A public proof-of-concept reproducer is available on GitHub, including both a harness and a crashing input file (PoC Repro). There is no evidence of active in-the-wild exploitation at this time, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.013% (0.000130), reflecting very low probability of exploitation in the near term. No threat actor attribution has been identified (Red Hat CVE).

Exploitation steps

  1. Prepare the environment: Obtain a system with local access where a vulnerable version of Wren (≤ 0.4.0) is installed or embedded in an application.
  2. Craft the malicious script: Create a Wren script containing a specially structured for loop — particularly a nested for loop inside a class method body — that triggers corrupted compiler state during bytecode generation.
  3. Supply the script to the Wren interpreter: Execute the crafted script via the Wren CLI or any application embedding the Wren VM (e.g., using the harness: ./bin/harness repro).
  4. Trigger the crash: The compiler processes the for loop, calls forStatement → endLoop → getByteCountForArguments at wren_compiler.c:2961, dereferences a NULL pointer, and the process crashes with a segmentation fault (SIGSEGV), causing a denial of service (Wren Issue #1220, PoC Repro).

Indicators of compromise

  • Process: Unexpected crash (SIGSEGV / segmentation fault) of the Wren interpreter process or any application embedding the Wren VM, particularly during script compilation.
  • Logs: ASAN reports referencing SEGV on unknown address 0x0000000005c8 in getByteCountForArguments at wren_compiler.c:2961; stack traces showing the call chain forStatement → endLoop → getByteCountForArguments.
  • File System: Presence of core dump files generated by the crashing Wren process; suspicious Wren script files containing unusual nested for loop constructs inside class method definitions (Wren Issue #1220).

Mitigation and workarounds

No official patched release has been published by the wren-lang project as of the disclosure date, and the project had not responded to the issue report at time of disclosure. Organizations should restrict local access to systems running affected Wren versions (0.1 through 0.4.0) and avoid processing untrusted Wren scripts with the vulnerable interpreter. Monitor the wren-lang/wren GitHub repository for a patched release and upgrade as soon as one becomes available. As an interim measure, implement input validation or sandboxing around Wren script execution to limit exposure (Wren Issue #1220, Red Hat CVE).

Community reactions

The vulnerability was assigned by VulDB and tracked under EUVD-2026-9122 by ENISA. Red Hat has acknowledged the CVE in their security advisory portal. Community reaction has been minimal, consistent with the low severity and limited scope of the issue; no significant researcher commentary or media coverage has been identified beyond standard CVE aggregator entries (Red Hat CVE, ENISA EUVD).

Additional resources


Source: This report was generated using AI

Related Homebrew vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-112390HIGH8.2
  • Python logoPython
  • open-webui
NoYesOct 19, 2026
CVE-2026-14511MEDIUM6.5
  • IBM WebSphere MQ logoIBM WebSphere MQ
  • cpe:2.3:a:ibm:mq
NoNoOct 19, 2026
CVE-2026-112778MEDIUM6.4
  • NixOS logoNixOS
  • traefik
NoYesOct 19, 2026
CVE-2026-112391MEDIUM6.3
  • Python logoPython
  • nemo-gym
NoYesOct 19, 2026
CVE-2026-111678MEDIUM4.8
  • NixOS logoNixOS
  • antiword
NoNoOct 16, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management