CVE-2026-2240 janet-lang janet compile.c janetc_pop_funcdef out-of-bounds

Medium 4.8 Published Updated

A local attacker can trigger an out-of-bounds read in the Janet compiler, potentially causing crashes or arbitrary code execution.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-2240?

CVE-2026-2240 is a medium-severity memory corruption vulnerability in janet-lang janet, published on 9 Feb 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

A vulnerability has been found in janet-lang janet up to 1.40.1. The impacted element is the function janetc_pop_funcdef of the file src/core/compile.c. Such manipulation leads to out-of-bounds read. The attack must be carried out locally. The exploit has been disclosed to the public and may be used. The name of the patch is 4dd08a4cdef5b1c42d9a2c19fc24412e97ef51d5. A patch should be applied to remediate this issue.

Weakness: CWE-125, CWE-119

Which versions are affected by CVE-2026-2240?

It affects 1 product.

Products include Janet-Lang Janet.

How do I fix CVE-2026-2240?

No fix has been published for CVE-2026-2240 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-2240 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-2240 exists.

Sources

Also known as GHSA-7wjv-672w-8j4q.

Is CVE-2026-2240 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free