CVE-2026-8261: Squirrel heap buffer overflow in SQFunctionProto::Load

CVE-2026-8261 · Severity: medium · CVSS 5.9 · Published 2026-05-11

Squirrel is a high-level imperative, object-oriented programming language designed to be lightweight for use in applications like video games. A vulnerability in how the language handles compiled bytecode files allows a specially crafted file to crash the application or potentially execute unauthorized code. This risk is present when an application using Squirrel loads untrusted script files from a local source.

Technologies: Squirrel Project Squirrel. Vendors: Squirrel Project.

Quick answers

Is CVE-2026-8261 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-8261 being exploited in the wild.
How severe is CVE-2026-8261?
Medium severity, with a CVSS score of 5.9, published 11 May 2026.
Which products and versions are affected?
Squirrel Project Squirrel up to 3.2.
Is there a fix for CVE-2026-8261?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-8261 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-8261?
Check whether you run Squirrel Project Squirrel at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A heap-based buffer overflow exists in Squirrel up to version 3.2 within the SQFunctionProto::Load function in squirrel/sqobject.cpp. The vulnerability is caused by an integer overflow in the _FUNC_SIZE macro when calculating memory allocation sizes for bytecode components (specifically nlineinfos and ndefaultparams). On 64-bit systems, crafted values in a .cnut bytecode file can cause the macro to wrap, resulting in a small memory allocation. Subsequent calls to SafeRead then perform a large write into this undersized buffer. An attacker can trigger this by providing a malicious bytecode file to any application using sqstd_loadfile or sq_readclosure. As of the advisory date, the project has not yet released a formal patch.

Affected products

  • Squirrel Project Squirrel up to 3.2

Timeline

  • 2026-04-22: disclosed: Issue reported on GitHub with PoC
  • 2026-05-11: advisory: NVD publication date

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.